Topic "Subfolders getting deleted while using the file mask"

Author Message
himanshu11986
[View user's profile]

Joined: 2016-10-03
Posts: 1
We are using the below script for archiving the files.

E:\app\WinSCP\WinSCP.exe /console /command "option batch on" "option confirm off" "open sftp://user:server:port" "mget -delete -filemask=<60D /Source/ Destination\" "ëxit"

It's coping and deleting the files (older than 60 days) including files under sub folders to destination but it is deleting the Sub-folders as well if they are older than 60 days.

We just want only files to be removed after successful transmission not sub-folders.

Can someone please advise what needs to be done for that.

Thanks,
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
See https://winscp.net/eng/docs/library_example_moves_files_keeping_directory_structure
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License