1.

Solve : help with copy.?

Answer»

I'm trying to run a file from my flash drive which allows me to copy a batch file from the flash drive into a specific directory on the main COMPUTER, and then run the copied file on the computer instead of running the file from my flash drive. any help with this would be much appreciated.ok here is a code that I think will work

Code: [Select]echo off
copy (flash drive, drive letter) (look in my computer)://"(full PATH of the batch file in the flash drive)/(batch file name)" to C://"Documents and Settings/Computer user name/The Directory you want"
call C://"Documents and Settings/computer user name/The Directory you want"
Unless you know what the drive letter of the flash drive will be not SURE it will work.  thanks alot, i have the problem sorted now and its all working well. Quote from: squall_01 on June 22, 2009, 03:18:21 PM

Unless you know what the drive letter of the flash drive will be not sure it will work. 

If it's in the drive (not in any directories) then use %cd% and if it's on more than one computer, use %username%.I always copy STUFF to the current directory by using ".". At least for those commands that whine if I don't give a target.
I use cd .. a lot, as well.unless you know what its going to be it wont help any


Discussion

No Comment Found