Looping through the files in directory

Unitech Pt630d mobile computer, batch, 1...
September 8, 2009 at 09:45:37
Specs: Windows 2003, 4/8G
Hi all,
I am running Windows 2003.
I am new to batch files, but need to do the following with your help:
I have a directory with 2 -3 files (potentially). I need to write .bat file that will take the first file (ba_20090908.txt) and
1. copy it to another dir
2. rename it
3. run a procedure against it
4. remove it from original dir

Then do the same with the next file in the directory, then next ... till they all processed.

Thanks,
Eugene


See More: Looping through the files in directory

Report •


#1
September 9, 2009 at 03:58:13
epipko, I'd first establish a variable 'x' and name it my active filename, then do whatever was required to 'x' and when done, clear 'x' and carry on to the next file and do it again, etc. You could use an 'if/then/else' to tell the process when to stop.
HTH.
Ed in Texas.


Report •
Related Solutions


Ask Question