Ok means you are saying that once all the files read from all subfolders and just assume that some new files get added to all same subfolders. Then it must not read the files which are read previously and only read the new files.
say there are a total of 50 sub folders in the main file and in that first run 10 of which are processed.
The bot may be stopped of some reason.
Now in the second run, those 10 sub folders which were processed shouldn’t be processed again, the bot must continue from the 11th subfolder
I got your query.
One solution for that will be processed files should move to some other folders and this will be efficient also.
Or else you can record the names of processed files to excel but it will take more time to check whether that file name is present in the excel or not and then proceed further.
So you can choose the solution of moving the files.
Folder names are text and not numbers… If you want the sequence then folders will have to be named like this: Folder_00001,Folder_00002,Folder_00003...
Also you may need to Sort the items after your command varMyFiles=Directory.GetFiles("c:\myfolder","*.*", SearchOption.AllDirectories) varMyFilesSorted = System.Array.Sort(Of String)(varMyFiles)
just make sure that if you have like 10 folders, that the ones from 1 to 9 have one zero to the left, and if you have more than 100 folders, that the 1 to 9 have 2 zeroes and the ones from 10 to 99 have one zero to the left…
@ray_sha wants to say that assume that there are a total of 50 sub folders in the main file and the workflow i have given her is perfectly 100% working but now she wants that if my workflow is running and while running suppose something happens and bot gets stop in middle only while reading the files from subfolders.
So next time when she will run the bot that should skip the already processed/readed files and continue with the files that are remained to process/read.
So for that i gave her solution that she should move the files to another destination once they get processed.
So for that now her que is as below
I am saved the processed sub folder in another folder.
Now I have to compare if the sub folders are present in the other folder as well.
How would I condition the if ?
Thanks
I am saved the processed sub folder in another folder.
Now I have to compare if the sub folders are present in the other folder as well.
How would I condition the if ?
I have updated the workflow as per requested. Below is the updated workflow. Updated_Ray_Sha.zip (8.3 KB)
Output :-
Within that subfolder names will be same as it is. Refer below SS :-
Main Folder :-
Copy of Main Folder :-
Within that subfolder inside all the files will also move same as Main Folder :-
Moved all files to Copy of Subfolder1 i.e., Empty Subfolder1 from Mainfolder