|
Answer» I want to get the current path of the batch file that is being run, along with the file included, and move the file that is included into a different folder.
I tried SOMETHING like this, but it doesnt work:
move %path%\Dry.file C:\Program Files\
can ANYONE help?You need quotes around any path with embedded spaces.
move %path%\Dry.file "C:\Program Files\"
You can also QUOTE the other side too, to be sure:
move "%path%\Dry.file" "C:\Program Files\"
Hope this helps. hmm, im getting an error now "The filename, directory name, or volume label syntax is incorrect."
i used move "%path%\Dry.file" "C:\Program Files\"What OS are you using? What does %path% represent. You may have to use DOS path names to get this to work.
move %path%\Dry.file C:\Progra~1\
im using MS XP Home, and %path% should get the current directory the batch file is in, correct?%cd% = current directory %path% = list of directories the processor searchs when a command or file name is typed at the prompt or Windows run box.
the set command will list out all the variables you can use. %cd% and %date% are not listed--internal to the processor.
Hope this clears EVERYTHING up. Ahh it finally works, thanks alot bro. You've been alot of help
|