Hi,
I have a shortcut alreay created with modifies propertiesto address a MS Access application.
What I need to do is copying this shortcut to a new destination like Desktop, using a VBScript.
PLease let me know your comments.
You need to use either of the Scripting.FileSystemObject methods Copy() or CopyFile(). Copy() can copy both files and folders, but only one at a time while CopyFile() can only copy files but can move multiple files with one operation. Here's some quick and dirty code that you'll need to change for your environment.
Code:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set MyFile = objFSO.GetFile([YourFileName])
MyFile.Copy ([YourFileTarget])
Hi,
I already tried both methods, they work to copy a file but not a shortcut. Even if I try to copy a file without mentioning its extention it is not working.
Should I add any extention to my shortcut name?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.