Jump to content

vl-file-copy pdf with link / shortcut


Manuel_Kunde

Recommended Posts

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".

 

 

image.thumb.png.aeae9b22c7d1dfaa9ba1cb8a87b1f497.png

Link to comment
Share on other sites

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 by Manuel_Kunde
Link to comment
Share on other sites

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 by Manuel_Kunde
  • Like 1
Link to comment
Share on other sites

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?

 

  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...