Manuel_Kunde Posted September 10, 2021 Posted September 10, 2021 Hi all, I have written a lisp that uses the vl-file-copy command to move this PDF to another folder. But this only works for the original pdf, not for the link! Does anyone know if I need to change something in the command to be able to move the link? The file name remains the same: "sheet_cover_building1". Quote
Steven P Posted September 10, 2021 Posted September 10, 2021 What is your line in your code for the vl-file-copy? (obviously if it is a shortcut link, the file extension will be .lnk ) 2 1 Quote
mhupp Posted September 10, 2021 Posted September 10, 2021 (edited) Don't really understand having a shortcut in the same folder as the file. This will allow you to create a shortcuts. http://www.theswamp.org/index.php?topic=25051.0 Edited September 10, 2021 by mhupp 1 Quote
Manuel_Kunde Posted September 13, 2021 Author Posted September 13, 2021 (edited) On 9/10/2021 at 2:43 PM, Steven P said: What is your line in your code for the vl-file-copy? With .lnk and .pdf it does'nt work either .. (vl-file-copy (strcat "\\path1\\" Data ".lnk") (strcat "\\path2\\" Data ".pdf") ) @mhupp I only store shortcuts in this folder. The original pdf just stored for demonstration. Edited September 13, 2021 by Manuel_Kunde Quote
Manuel_Kunde Posted September 13, 2021 Author Posted September 13, 2021 (edited) Okay i got it. You have to append this file extension to the source file. (vl-file-copy (strcat "\\path1\\" Data ".pdf - Verknüpfung.lnk") Does anyone know if it is possible to make a PDF (without shortcut) from the source file that I move to another folder with vl-file-copy? If I enter the file extension in the destination folder to ".pdf", the file is moved, but Adobe tells me when I open it that the PDF is corrupted. In this case it would have to convert the .lnk file to .pdf. Edited September 13, 2021 by Manuel_Kunde 1 Quote
Steven P Posted September 14, 2021 Posted September 14, 2021 On 9/13/2021 at 10:07 AM, Manuel_Kunde said: (vl-file-copy (strcat "\\path1\\" Data ".pdf - Verknüpfung.lnk") Does anyone know if it is possible to make a PDF (without shortcut) from the source file that I move to another folder with vl-file-copy? If I enter the file extension in the destination folder to ".pdf", the file is moved, but Adobe tells me when I open it that the PDF is corrupted. In this case it would have to convert the .lnk file to .pdf. if you have the shortcut link then you -should- be able to get the relevant file path from that. I haven't tried it but this suggests you can do that in VBA ( https://social.msdn.microsoft.com/Forums/en-US/fd6a0d4c-94ea-43b0-87d7-a706eeb04734/how-to-retrieve-the-target-of-a-shortcut-file-in-vb-code ). I don't use VBA so I have no idea if it works or not.. so assuming you can, you should be able to put that in the vl-file-copy and go from there? 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.