简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM