Topic "How to locate a file in a subfolder"

Author Message
afts
[View user's profile]

Joined: 2012-11-10
Posts: 1
Location: Seattle
I'm using a simple script to login to a customer site using this type of code.

"C:\Program Files\WinSCP\WinSCP.com" /console /script=p:\Check.scp

Then check.scp has these types of commands in the text file:

option batch on
option confirm off
open z_Testing
cd /documents/v2
option transfer binary
lcd P:\queue\


Earlier in the processing day I will have uploaded a file that the client using a PUT command in the script file.

The client parses the zip file that I send, and creates a validation file I need to access.

The problem is they put this into a new "sub-folder" that I don't know in advance, and thus can't change to that folder using the CD command.

It has a name like: XYZ_d9f88f2a-1961-4532-b892-5d8592f43e05\

Is there some way to use a wildcard and look for any "done.zip" file in any folders?

Or can I create a list of sub folders using the LS command and then use that to step through the folders found?

Any help for my newbie scripting efforts are appreciated.
gman804
[View user's profile]

Joined: 2012-11-17
Posts: 6
Location: NJ
can you do a "synchronize local <local dir> <remote dir>" so that anything on the remote location will be duplicated locally?

is any part of the validation file that is the same each time, allowing you to use a filemask on?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
You can do "get -filemask=done.zip", but that would replicate remote directory structure locally.
_________________
Martin Prikryl
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