user3069396
user3069396

Reputation: 27

PowerShell - actions over files in folders and subfolders

So basically, there is a tab in a website containing thousands of .pdf files. It's a list with folders of which some of them have subfolders. Obviously, these folders/subfolders contain the files. In order to download the files, I need to open each and every folder, right click on every single file and click download. Is there a way to automate this recursively with PowerShell for all the files? Or maybe UiPath?

Upvotes: 1

Views: 204

Answers (1)

Conor
Conor

Reputation: 740

If you are unable to access the server files directly, so not through the website but through Windows Explorer then that would probably rule out, or at least make it quite trick to use power shell.

However this is something that UiPath should be able to cope with quite easily. Several automation's I have worked on do a similar thing.

Essentially the automation would need to do the following

  • login
  • enter search terms
  • for each returned folder
    • for each file in folder
      • Download file
    • for each folder in folder
      • repeat above

Essentially you need to build a recursive loop to loop through all of the folders and files, downloading a file when you encounter one

Upvotes: 1

Related Questions