I have a problem that I have been trying to solve.
I am trying to use the FOR dos command to look for all text documents that exist in a specific file named "spool" and copy them into a specific file called "history" that exists in the same folder as spool does.
This spool file exists in many different places inside the following directory: C:\test
for example like this:
So far here is what I have, and I know that this is nowhere close to what I am trying to, but I am trying to get a start but I keep getting stuck.
for /r C:\test\ %%A in (*.txt) do If %%~nA equ spool copy *.* %%~nA equ history
This clearly does not work, and only returns gibbrish.
What am I doing wrong?
If anyone can help, I would be very very thankful.