cypher175 Posted December 2, 2008 Posted December 2, 2008 Is there any way for AutoIt to read a shortcut.lnk file and then copy the file its pointing to, into another directory..?? say like DOC123.lnk exists in folder "C:\Documents and Settings\%username%\Recent\" and it points to "C:\Documents and Settings\%username%\Desktop\DOC123.RTF" is there anyway to read that shortcut.lnk file then copy the file it points to, into another directory, then delete that shortcut.lnk file..??
oMBRa Posted December 2, 2008 Posted December 2, 2008 $ShortcutPath = 'Path of your shortcut' $PathTo = FileGetShortcut($ShortcutPath) $Destination = @DesktopDir; replace this with your destination If Not @error = 1 Then FileCopy($PathTo[0], $Destination) FileDelete($ShortcutPath) Else MsgBox(0, '', 'invalid shortcut') EndIf
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now