bloog
(Banibadrouch)
November 15, 2022, 11:31am
1
Hi all ! (sorry for my english, i’m french)
I need your help for my problem here :
I try to merge files in folder that have the same value inside file name. Then with this value, i create a folder if not exist. For example :
The value can be 2021, 2024, 2020…
Thanks a lot for your help
Anil_G
(Anil Gorthi)
November 15, 2022, 2:36pm
2
Hi @bloog
Please look at the attached xaml
filesseggrgation.xaml (13.3 KB)
in variables pass the main folder where you have the files
cheers
Use directory.getfiles(your filepath) to get a list of the files.
Then loop through each file assigning the year within the string as a key in a dictionary of (String, String). Assign the file name (item) as your value to the key. Your dictionary should now contain:
Key’s= Years
Value’s = file names in that year
bloog
(Banibadrouch)
November 15, 2022, 3:26pm
4
Thanks Anil_G BUT i can’t open the project with StudioX…
Anil_G
(Anil Gorthi)
November 15, 2022, 3:32pm
5
Hi @bloog
No Problem…This is studio. Try like these screenshots
Variables:
start
If condition in loop
Next loop
Inside the loops
Hope you can recreate in studiox
cheers
bloog
(Banibadrouch)
November 15, 2022, 6:42pm
6
@Anil_G
Thanks a lot, i really understand your method (but the method “.combine” doesn’t exist in studioX ) il will try to find a solution
@grant.grisham
Thanks for your reply
2 Likes
Anil_G
(Anil Gorthi)
November 15, 2022, 6:51pm
7
Hi @bloog
You can directly give like this as well
mainfolderpath + “\” + currentItem or directly include a trailing \ in mainfolderpath
Please mark the solution if its resolved. It would help others to identify who needs help
cheers
system
(system)
Closed
November 23, 2022, 10:58am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.