I know only the basics of writing batch files. I'm trying to figure out how to write one that, given any directory in which it is located, will copy the file located in the same directory and put it in a new location. I know how to copy a file and move it, but I don’t know how to write a batch file to understand its directory and then capture another file.
I read that% 0 represents the directory where the file is located, but how can I add a file to it?
I tried this:
copy "%0\Move.txt" "C:\"
It might have been stupid, but I'm new. Help me please?
windows batch-file command-prompt
Kyle wright
source share