I want to move all the files in a specified folder to an another (archive) folder. I have found the move file activity from UiPath.Core.Activities.MoveFile
When i simulate a “move file activity” in a sequence i have to select a file-name (for example a excelfile) form a folder. That works and in the to-folder I only provide the name of the folder.
When ik want to move all the files in a specified folder and I just drop a folder-name in the “from folder” of the activity it becomes 'read only" after running.
If I’m not mistaken, this activity will execute a move file command, but will not wait for the move to be completed. You’ll need logic in your code to wait for the file to be fully moved to the target directory to gain read access.
I dont think pointing to a folder is the way to use this, if you want to move all files, your should first get the files from the folder using like Directory.GetFiles Method (System.IO) | Microsoft Learn and the in a for each, use the move file activity.
I already have build to move files in a specified folder to an another (archive) folder. I have attached the code.
This is now built in for 1 location. The entire process is completed per location and a different location starts via a loop. I want to make the archive container variable so that all locations are picked up. In the attachment also a photo of the folder structure.
Anyone have an idea? Thanks already