I am downloading pdf’s from a portal and the pdfs are available in batch wise like (ex. batch1 have 25 pdf, batch2 have 20 pdf)
So when i download batch1 pdf’s i want to move those pdf’s into the folder name of batch number
after that will download batch2 pdf’s then need to move into batch2 folder
(batch number will change everytime and pdf name also change every time)
Above is the destination path for move pdf
Welcome to the UIPath community.
- How do we identify the batch Name ? The same Login will be used to create the Folder . Assuming Batch 1 is decided by a Selector on Screen.
- a. So we take a StrVariable based on the selector and Assignvalue as “Batch1”.
- b. We take a Create Directory and Create the Fodler Batch1 at desired location. “D:\Data\Batch1” and Store this path in a variable say BatchPath .
- while Downloading - In the Save as - We Pass the Path BatchPath created above and folowed by the FileName.
- If File Names are Random you can save the File by the Name you Decide appended by Date Time Second Stamp
You can also use a ‘For each’ activity to loop through all the files inside a folder and so
To a variable type array of strings, assign = directory.getfiles([FolderPath])