Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Behemoth

Can you leave a holding file in each remote folder (eg an empty text file or similar) and exclude it from the get via filemask? If the remote folders aren't empty they shouldn't be deleted I believe.

I'm no expert, just an idea I had while looking to solve the same problem.
Switchkat

Get files in subfolders and delete after copy, but leave folder structure?

Hi all. I've been scouring the forums for days but have not been able to find the answer I'm looking for. I have a working script that traverses all the sub-folders in a root folder, gets the files, and then deletes all files that were transferred, but it also deletes the folder structure on the SFTP site.

Is it possible to leave the folder structure and only delete the files that were transferred?

Here's the script I'm using now.
     "option batch continue" ^

   "option confirm off" ^
   "get -transfer=binary -delete -filemask=*.docx * .\" ^
   "close" ^
   "exit"


Thanks