i have one folder in D:drive like folder name “Rpa” in that i have multiple files like .pdf,.xlsx,.doc.
i want copy particular .pdf files copy to E:Drive “Backup” folder.
how can do it ?
Install below component from Uipath GO and then use Move Files activity and specify "*.pdf** in it to move all pdf files from source to destination path.
and use for each item in StrDirectoryarray
and then use Move file activity
What you have to do is, first you need to get the list of files that you need to move from the source folder…
This code will give you all the pdf files in the given folder path… The output of this will be a string array that holds the full file path for each file
Next, use a For Each activity to loop through the items in the array. Set the argument type of the For Each activity to String.
Within the for each loop, place a move file activity. In this activity, for the source path, provide item.ToString which contains the file path for the file you want to move.
For the destination, Provide the destination folder path along with the file path that you can take from the file path of item variable like this
"E:\Backup\" + Path.GetFileName(item.ToString)
This will move the files one by one
You can get the names of all the files when you use for loop and give in the folder name…
For each file in (“YourFolderPath”)
Move file (Input: Source and Destination)
This way you can easily move the PDF files from one location to other…
Thanks and regards,
i don’t want to move files i want copy only.
Use Copy file and pass the item like (“D:\RPA”,"*.pdf")
Thanks its working .
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.