Jump to content

copy s horcut to desk top


bobthenob

Recommended Posts

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 exe

ive 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 advance

Bobthenob

Link to comment
Share on other sites


hi

thanks for your help

this is giving me a head ache

I thought it would work ive checked the snytax

heres a pic of the batch file and a pic of the cmd window

cmd-window.jpg

batch-window.jpg

if 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 copy

whent to the desktop rightclicked create shortcut.then i copied that shortcut into the flashfxp folder

thanks again for your help

just tryed this installed flashfxp

copied the shortcut that it made whren it installed it. to the folder programfiles/flashfxp

it worked yahoooooooo

but i dont see why the other way didnt work

Edited by bobthenob
Link to comment
Share on other sites

I'm glad you got it working.

Just to present another possibility, you can execute a small VBS script

to 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.Save

copy/paste the above into notepad and save as FlashFXP.vbs and execute it anytime

AFTER the flashfxp directory actually exists.

shark

Link to comment
Share on other sites

I'm glad you got it working.

Just to present another possibility, you can execute a small VBS script

to 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.Save

copy/paste the above into notepad and save as FlashFXP.vbs and execute it anytime

AFTER the flashfxp directory actually exists.

shark

how to execute vbs script from batch file?

Link to comment
Share on other sites

how to execute vbs script from batch file?
batchfile example:
wscript.exe fullpath\to\FlashFXP.vbs

exit

I had some problems with commands for vbs scripts in batch files and

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

thanks for your imput Shark007

id 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

Link to comment
Share on other sites

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...