Scripting: get command - delete option Deleting Directories

Advertisement

PK
Joined:
Posts:
1
Location:
Australia

Scripting: get command - delete option Deleting Directories

When I use the get command with -delete in my script to recursively search, download and delete the downloaded files within subdirectories, it is deleting the directories/subdirectories on the host
My command is
"get ""/Directory/*"" -delete -resume -preservetime -filemask=*.dat ""C:\Temp_Download\""" ^
I have read in another topic (Directory Deleted Unexpectly During GetFiles):
If the FTP directory ends without the /* then all the files will be downloaded but the folder will be removed along with the files.
However, my problem is that I am using the /* and my directories are still being deleted

I am using WinSCP version 6.5.2

Is there a way of recursively working through subdirectories downloading and deleting files but still keeping the directory structure in place??

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum