I am trying to execute a certain task where i am required to read files (one at a time) from a folder which can have undefined number of files. I need to be able to MOVE the first file in the folder to a new location and then execute another task with another batch file.The main aim is to read one files at a time instead of doing a *.* which will read all files at once.
Any help would be appreciated !
Thanks
I am trying to execute a certain task where i am required to read
Share
You can use a for command something like this:
If you are putting this command in a batch file you will need to double up the % symbols like this:
In the YourBatch.bat file access the file name using %1% something like this:
EDIT:
To only process one file simply exit at the end of the first loop: