Hello all,
I have some folders need to all the folders to another directly,
but each subfolder contains two folder, “online” and “offline”.
I just need to copy online folders, no need to copy “offline” folders.
Thanks.
Hello all,
I have some folders need to all the folders to another directly,
but each subfolder contains two folder, “online” and “offline”.
I just need to copy online folders, no need to copy “offline” folders.
Thanks.
Hi @li.yu
First you need to create array of string variable (ex Dir_arr)
using assign activity use this syntax Dir_arr = Directories.getDirectories(“D:/Uipath”)
use for each to iterate the main folder
inside the for create another array variable( ex Sub_dir_Arr)
then use for each to iterate sub dir (online, offilne)
use if activity to check directory name using this syntax Directory.getdirectoryname(loop2_iteravtive_variable)=“online”
Inside then block of if activity
use copy file activity to copy the particular files
Thanks,
Hi @li.yu
you can try with For Each folder in Folder ->Move folder Activity which will be in System.activities
Regards
Sudharsan
Hi @li.yu
Please find the attached xaml , i developed a flow as you expected
Thanks,
test12.xaml (11.5 KB)
thanks, @Robinnavinraj_S , something is missing, would you please help to provide the whole package with zip file here, thanks.
Thanks. @Sudharsan_Ka , it can resolve the copy from one folder to another, but can’t exclude some files.
you need to exclude some files as well?
Hi,
If you need to exclude some files, you can just create the folder “online” to the new directory and ca use for each file in folder in order to move they with a IF statement in order to exclude some files with specified name or regex!
Thanks all, I resolved the issue with adding the key word “online” in the copy from path.