Post a reply

Options
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)

Options

Topic review

martin

Re: How to locate a file in a subfolder

You can do "get -filemask=done.zip", but that would replicate remote directory structure locally.
gman804

re: How to locate a file in a subfolder

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?
afts

How to locate a file in a subfolder

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.