How to locate a file in a subfolder

Advertisement

afts
Joined:
Posts:
7
Location:
Seattle

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.

Reply with quote

Advertisement

gman804
Joined:
Posts:
6
Location:
NJ

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: How to locate a file in a subfolder

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

Reply with quote

Advertisement

You can post new topics in this forum