Topic "Wildcard use in scripts"

Author Message
apurva
[View user's profile]

Joined: 2009-10-06
Posts: 4
I am trying to get filename from different directories. To do that I am using the following command in my script

Code:
get "/abc/jkl/com?/stats" c:\logs\


Scenario is that there are folders by name com1, com2, com3 etc.. and I am interested only in the "stats" file in each directory.

The above command gives me
Code:
Error listing directory '/abc/jkl/com?'
.

I haven't even reached the second part of using Operation masks to store the several stats file as "stats.com1", "stats.com2" etc.

Using version 4.2.3 build 494
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
You cannot use file masks for directories in path, only for filenames.
_________________
Martin Prikryl
apurva
[View user's profile]

Joined: 2009-10-06
Posts: 4
Any other way I can accomplish this? pointers would help. I just don't want to download the whole folders for one file.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
You can list the directories, parse it with some script to generate WinSCP script file for downloading specific files. See this example for similar task.
_________________
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