Hello…
I need quick help here, currently, I am working on automation where I need to create 3 folders in a Parent folder.
I tried putting the following expression:-
“path.Combine(in_folderpath,in_foldername+”/“+“Input_File”+”/“+“Image_JPEG”+”/“+“QR_Code”)”
but its creates a folder inside a folder and the expected output is
Input_File
Image_JPEG
QR_Codes
Or if there’s any other way that will be a great help.
ppr
(Peter Preuss)
January 18, 2024, 3:44pm
2
We Would assume, that the confusion comes from:
the slashes and the concatenated folder names
When e.g.is needed
C:\_rpa\Input_File
C:\_rpa\Image_JPEG
C:\_rpa\Image_JPEG
we can do:
Variable: strRootFolderPath = "C:\_rpa"
item in new String(){"Input_File","Image_JPEG","QR_Codes"}
2 Likes
ppr
(Peter Preuss)
January 18, 2024, 3:46pm
3
in addition to above:
so we omitted the existence check
vrdabberu
(Varunraj Dabberu)
January 18, 2024, 4:13pm
4
Hi @Anirudh_Tugawe
Use the below syntaxes in Assign activities:
sharedLocation= "C:\"
folder= path.Combine(sharedLocation,"2024")
InputFolder= Path.Combine(folder,"Input_File")
ImageFolder= Path.Combine(folder,"Image_JPEG")
QRFolder= Path.Combine(folder,"QR_Code")
All the variables are of DataType System.String. Make sure to change the path in sharedLocation variable and folder names according to yours.
→ After the Multiple Assign I have used Folder Exists and If. If the folder is already present, it won’t create a new folder. Same in case of all folders.
Workflow:
xaml:
Sequence19.xaml (17.6 KB)
Output:
Regards
Thank you so much, you saved my time
God bless you.
ppr
(Peter Preuss)
January 18, 2024, 4:15pm
6
Thank You i will try this method too.
1 Like
system
(system)
Closed
January 21, 2024, 4:17pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.