hey @Eric_Wong_Test
Thanks for the Help!
Hi @ray_sha
but the sub folders wont be processed in a particular order.
Sorry, I didn’t get you. Means how the subfolder structure will be ??
Happy Automation
Best Regards
Er Pratik Wavhal
Hey
The sub folders are numbered as Sub_folder_1, Sub_folder_2,…Sub_folder_n
But in the for each loop the bot doesn’t picks it up accordingly in the numbered sequence.
It picks up Sub_folder_1 first, then it can pick Sub_folder_12, and so on.
Hi @ray_sha
So you want that it should pick up the subfolder in sequence or not ??
When i run the same workflow here it is picking up in sequence only. Thats why i put the message box to see which folder is currently going on.
And if you are saying that After Picking Sub_folder_1 it picks Sub_folder_12 directly just bcz initially der is “1” so you have to rename those 1 to 9 folders as 01,02,… So on.
I haven’t tested it with more than 6 subfolders so i didn’t recognise that. If such thing is happen that after Subfolder1 it directly picks Subfolder12 then you must rename 1 to 9 folders as subfolder01, subfolder02, and so on till Subfolder09
May i know what actually you want as output and what you are facing now ??
Happy Automation
Best Regards
Er Pratik Wavhal
Hey @Pratik_Wavhal,
So if I do so and its starts picking up in sequence
It wont read the same file twice?
Thanks
hi @ray_sha
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.
RIght ??
Happy Automation
Best Regards
Er Pratik Wavhal
hey @Pratik_Wavhal
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
Hey @ray_sha
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.
Happy Automation
Best Regards
Er Pratik Wavhal
Hey,
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
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…
Hi @bcorrea
@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
Happy Automation
Best Regards
Er Pratik Wavhal
I would not give myself that trouble… I would just do everything again and overwrite if already there…
Hi @ray_sha
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
Mark as solution and like it
Happy Automation
Best Regards
Er Pratik Wavhal
hi @ray_sha
So the solution i have provided is useful for you now ??
Means does your issue is solved with my solution ??
If Yes then
Mark as solution
Happy Automation
Best Regards
Er Pratik Wavhal
Hi Pratil_Wavhal,
Thanks for the solution,
But i have different file extenstions,i need to extract all of them,how can we do it.
thanks
Hi @Navya
I have already posted the solution on below thread. Have a look to it.
Mark as solution and like it der
Happy Automation
Best Regards
Er Pratik Wavhal
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.