1.

Solve : Setting up an "array" of files in a batc?

Answer»

I have a bunch of files with a .a extension. They are located in various subdirectories (nested various levels deep) off my current directory. I can list the files by executing the command 'dir /s *.a' to recurse through the directory STRUCTURE. What I'd like to do
is to write a batch file to move all my files with a .a extension to another subdirectory. Is there a way I can put this file list into an "ARRAY" ala something like for %%F in (dir/s *.a) do copy %%f ? That's the way it works in UNIX, but I'm not sure about DOS.It is the same way in Dos.

uliAlso try USING the move command instead of the copy command. Move actually moves the file, whereas copy makes a copy but does not delete the original..



Discussion

No Comment Found