I have a school assignment and I am stuck on this one question. I have no idea where else to turn.
So this question follows on from the previous question which is to make a script to copy "myfile.txt" to my environment variable %BackUpPath% (which is set to C:\backup). My script is as follows:
- copy /y myfile.txt %backuppath%
The question I'm stuck on asks me to make a script using an IF EXIST statement in conjunction with a FOR loop to copy all the files in the current directory, but not any sub-directories to %backuppath%.
How should I write this script?