bobthenob Posted November 29, 2005 Posted November 29, 2005 hi ive set up my cd to copy flashfxp to "C:/program files/flashfxp/"how can i copy a short cut on the desktop thats linked to the exeive been searching and trying everything but cant get it to copy the shortcut.I made a shortcut and put it in the folder "C:/program files/flashfxp/" called it flasfxp.lnk but it says cant find file heres my batch file copy "C:\Program Files\FlashFXP\flasfxp.lnk" "%USERPROFILE%\\Desktop\*.*"thank in advanceBobthenob
Grake Posted November 29, 2005 Posted November 29, 2005 hmm tried that exact code here and it worked fine.
bobthenob Posted November 29, 2005 Author Posted November 29, 2005 hi thanks for your replyit will copy any other file but not shortcut
Sonic Posted November 29, 2005 Posted November 29, 2005 shortcuts has link extension LNK ... not i (upped) /!\Recheck your syntax ... no problem to copy shortcuts to other location ...Goodbye.
Grake Posted November 30, 2005 Posted November 30, 2005 when I tried it, I made the folder, and put a flashfxp.lnk and ran your code. It copied it fine. is your shortcut named exactly as here?
bobthenob Posted November 30, 2005 Author Posted November 30, 2005 (edited) hithanks for your help this is giving me a head acheI thought it would work ive checked the snytaxheres a pic of the batch file and a pic of the cmd windowif i rename flashfxp.lnk to flashfxp.exe it copys but its not linked to that folder ( its just the exe)so its got be how i made the link, I opened the flashfxp folder rightclicked the flashfxp.exe selected copywhent to the desktop rightclicked create shortcut.then i copied that shortcut into the flashfxp folderthanks again for your helpjust tryed this installed flashfxpcopied the shortcut that it made whren it installed it. to the folder programfiles/flashfxpit worked yahoooooooobut i dont see why the other way didnt work Edited November 30, 2005 by bobthenob
Shark007 Posted November 30, 2005 Posted November 30, 2005 I'm glad you got it working.Just to present another possibility, you can execute a small VBS scriptto CREATE the shortcut instead of copying an existing shortcut.Set objShell = CreateObject("WScript.Shell")Set objShortCut = objShell.CreateShortcut("C:\Documents and Settings\All Users\Desktop\FlashFXP.lnk")objShortCut.TargetPath = "%programfiles%\FlashFXP\FlashFXP.exe"objShortCut.Description = "Transfer files using the FTP Protocol"objShortCut.Savecopy/paste the above into notepad and save as FlashFXP.vbs and execute it anytimeAFTER the flashfxp directory actually exists.shark
getmethere Posted November 30, 2005 Posted November 30, 2005 I'm glad you got it working.Just to present another possibility, you can execute a small VBS scriptto CREATE the shortcut instead of copying an existing shortcut.Set objShell = CreateObject("WScript.Shell")Set objShortCut = objShell.CreateShortcut("C:\Documents and Settings\All Users\Desktop\FlashFXP.lnk")objShortCut.TargetPath = "%programfiles%\FlashFXP\FlashFXP.exe"objShortCut.Description = "Transfer files using the FTP Protocol"objShortCut.Savecopy/paste the above into notepad and save as FlashFXP.vbs and execute it anytimeAFTER the flashfxp directory actually exists.sharkhow to execute vbs script from batch file?
Shark007 Posted November 30, 2005 Posted November 30, 2005 (edited) how to execute vbs script from batch file?batchfile example:wscript.exe fullpath\to\FlashFXP.vbsexitI had some problems with commands for vbs scripts in batch files andfound you must place 'wscript.exe' in front of the command to avoid these issues.Quote is editted with the new format, sorry if i caused anyone any problems.shark Edited December 3, 2005 by Shark007
bobthenob Posted November 30, 2005 Author Posted November 30, 2005 thanks for your imput Shark007id never thought of a vbs script ill bear that in mind any idea why the shortcut wouldnt copy?(whent to the desktop rightclicked create shortcut.then i copied that shortcut into the flashfxp folder)thanks again great forum
Shark007 Posted November 30, 2005 Posted November 30, 2005 any idea why the shortcut wouldnt copy?yep, there is a double backslash in your command.%USERPROFILE%\\Desktop\shark
MHz Posted December 1, 2005 Posted December 1, 2005 The space after .lnk could be removed also that shows in the pictures....lnk "
Yzöwl Posted December 1, 2005 Posted December 1, 2005 copy "%programfiles%\flashfxp\flashfxp.lnk" "%userprofile%\desktop"
bobthenob Posted December 1, 2005 Author Posted December 1, 2005 hi thanks for all your supportthe problem is that a shortcut made by the program will work but if i make a shortcut it wont copy it?
XRainBoX Posted July 30, 2006 Posted July 30, 2006 use WinRAR to do this!compact all files and make a SFX so so so EASY !
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