Copy Shortcut

M

Martin

Hello,

I have the following code which works fine to copy files:

Dim SourceFile, DestinationFile, Username

SourceFile = "\\[MyServer]\[MyFolder]\[MyFileName].[extension]"
DestinationFile = "c:\Temp\[MyFileName].[extension]"

FileCopy SourceFile, DestinationFile

However I want to copy a Windows shortcut file and this doesnt have an
extension so when I run this it states it can't find the file however the
shortcut is there.

Can anyone help on this? I have tried to find a extension for shortcuts but
there doesnt seem to be one?

Many thanks in advance

Martin
 
T

Tom van Stiphout

On Thu, 25 Feb 2010 05:17:01 -0800, Martin

Carefully check the Properties window, and you will find they have a
..lnk extension.

-Tom.
Microsoft Access MVP
 
M

Martin

Thank you

Tom van Stiphout said:
On Thu, 25 Feb 2010 05:17:01 -0800, Martin

Carefully check the Properties window, and you will find they have a
..lnk extension.

-Tom.
Microsoft Access MVP

Hello,

I have the following code which works fine to copy files:

Dim SourceFile, DestinationFile, Username

SourceFile = "\\[MyServer]\[MyFolder]\[MyFileName].[extension]"
DestinationFile = "c:\Temp\[MyFileName].[extension]"

FileCopy SourceFile, DestinationFile

However I want to copy a Windows shortcut file and this doesnt have an
extension so when I run this it states it can't find the file however the
shortcut is there.

Can anyone help on this? I have tried to find a extension for shortcuts but
there doesnt seem to be one?

Many thanks in advance

Martin
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top