Batch commands to copy all files from current dir to destination
Answers
Answered by
0
batch-file command-prompt
I know only the very basics of writing batch files. I am trying to figure out how to write one that, given any directory it is in, would copy a file that is within the same directory and put it in a new location. I know how to copy the file and move it, but I don't know how to write the batch file to understand its directory and then grab a different file.
I read that %0 represents the directory the file is in, but then how can I append a file to that?
I've tried this:
copy "%0\Move.txt" "C:\"
I know only the very basics of writing batch files. I am trying to figure out how to write one that, given any directory it is in, would copy a file that is within the same directory and put it in a new location. I know how to copy the file and move it, but I don't know how to write the batch file to understand its directory and then grab a different file.
I read that %0 represents the directory the file is in, but then how can I append a file to that?
I've tried this:
copy "%0\Move.txt" "C:\"
Similar questions