Topic "Auto-downloading Script Help Needed."

Author Message


Hey, I'm using a script to automatically download new files that are in a specified directory on the server, and I want to make the script not look for files that match the mask in directories that are inside this directory, cause what it does is look for the files in all the directories in the parent directory I've specified and it creates a lot of unneeded empty directories since the files I've filtered for the script to grab will be in the directory I've specified only, and not in a directory in it.

This is the script:
option batch abort
open ftp://user:pass@IP:port
option transfer binary
get -resume -preservetime -filemask=*.ts>4H "/files/Sources/Completed" "D:\Incoming\"

And this is the batch files that I use to run the scrip, though I doubt it's needed:
@echo off
start /min winscp.exe /console /script=download_script.txt

I'd be really grateful if this could be solved, but nonetheless, this is a great solution for auto-downloading from the server.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
WinSCP cannot skip the directories that does not contain any matching file.
Martin Prikryl


prikryl wrote:
WinSCP cannot skip the directories that does not contain any matching file.

Okay, I see. Thanks for the reply.

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License