Wildcard use in scripts

Advertisement

apurva
Joined:
Posts:
4

Wildcard use in scripts

I am trying to get filename from different directories. To do that I am using the following command in my script

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
Location:
Prague, Czechia

Re: Wildcard use in scripts

You cannot use file masks for directories in path, only for filenames.
_________________
Martin Prikryl

Reply with quote

apurva
Joined:
Posts:
4

Thanks

Any other way I can accomplish this? pointers would help. I just don't want to download the whole folders for one file.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
Location:
Prague, Czechia

Re: Thanks

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

Reply with quote

Advertisement

You can post new topics in this forum