Checking file existence - using mask in file extension

Advertisement

luisa.rodriguez
Joined:
Posts:
2
Location:
MX

Checking file existence - using mask in file extension

Hi all,

I'm using the functionality described in the following post: https://winscp.net/eng/docs/script_checking_file_existence
to check if a file exists in an ftp folder. And I'm using a mask to get files with similar characteristics. In particular the command ls.
A part of that, I need to use a mask at extension level, for example if the program checks the existence of a file, the following options should return true:

- filename.test00.txt
- filename.test00.log
- filename.test00.cfg

is there a way to check the extension using a mask? something like
- filename.test00.[txt|log|cfg]

thanks for your help[/url]

Reply with quote

Advertisement

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

Re: Checking file existence - using mask in file extension

You can only use filename.test00.*.
For anything smarter, you better use WinSCP .NET assembly.

Reply with quote

luisa.rodriguez
Joined:
Posts:
2
Location:
MX

Re: Checking file existence - using mask in file extension

martin wrote:

You can only use filename.test00.*.
For anything smarter, you better use WinSCP .NET assembly.

Thanks Martin.
Using '*' would not work for me as there could be more files with the same name but different extension.
I will check the Net assembly.

thanks again,
Luisa

Reply with quote

Advertisement

You can post new topics in this forum