Post a reply

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)


Topic review


Script Update

I was able to improve the script some like this.

cd /public_html/script-test
lcd C:\winscp
get -filemask="*.835; *.pdf" -rawtransfersettings[1] ExcludeEmptyDirectories=1 * -delete

It now leaves the folders that have no files but still deletes the folders that has files in them. Will I need to go the the full blown powershell sync script?

Alter script to leave remote folders in place

I have a scheduled task in place calling a script to weekly retrieve .pdf and .835 files from a remote server. The script has the get command in it listed below:
get * "D:\remote-files" -filemask="*.835,*.pdf" -delete

The problem is that the script is grabbing these files but it is also deleting all of the folders that it finds on the FTP. Is there anyway to change this to grab .835 and .pdf from various folders, delete the files, and leave the folders in place on the remote server?