I am trying to select 1000 files from a set of 300,000. It is not a specific file type i need i just want to select a certain number of files then copy them to a new location.
So in total i am trying to select small number of files from a larger set then copy/move those files into another location i then would like to repat this until all the files have been copyed/moved into seperate folder and then inturn to run a batch file at each of the folders which will then put its output into a different folder with a similar name as the folder from which they were taken.
My rough idea of how it could work would be to create "counter" variable which auto-increments a +1 to its value every time a file is copyed from the main location, then once this variable = 1000 it would exit the loop and then run the batch against the folders its created.
I have attached a small example project that demonstrates a method of doing this. I use a file set to define the total set of files (100 files in total). I then use a FileSet iterator to loop through the files and move them to a seperate directory. I use a counter to limit the iterator to only run 10 times, before the iterator is exited and a batch file is run (which performs a directory listing of the files that were moved and then deletes the files).
Once the batch file is run, the FileSet iterator runs again (refreshing the FileSet values, to discard the files that were moved in the last batch) and the process continues until there are no files left in the source directory.
I have commented the project to explain each step of the process. Let me know if you have any questions or need any further assistance with this.