.\ not working for current dir when using WinSCP.com

Advertisement

Reth
Guest

.\ not working for current dir when using WinSCP.com

Hi,

when trying to download datasets from IBM Host via WinSCP.com .\ at the end for getting the file into the current directory does not work. It shows error:
The attributes for the file “.\” cannot be determined.
The file or directory “.\” does not exist.
I am using:
get -filemask="G*V00" -latest .\
for the download.
Any idea what could be wrong here? Or do I have to applied it somehow differently?

Thank you in advance and
Kind Regards

Reply with quote

Advertisement

Reth
Guest

.\ not working for current dir when using WinSCP.com

Also any other directory or directory + filename does not work, for example:
get -filemask="G*V00" -latest C:\Temp\latest.txt
Always raising the error:
The attributes for the file “C:\Temp\latest.txt” cannot be determined.
The file or directory “C:\Temp\latest.txt” does not exist.
Any idea on that?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
42,276
Location:
Prague, Czechia

Re: .\ not working for current dir when using WinSCP.com

You are missing the source parameter of the get command.
https://winscp.net/eng/docs/scriptcommand_get
You are probably getting confused by seemingly having specified the source using -filemask. But that only further filters the source files.
As your filemask seems to be trivial, you can just do:
get G*V00 -latest .\
If you really wanted to filter the source somehow (e.g. apply the file mask recursively), you can just use * for the source:
get -filemask="G*V00" * -latest C:\Temp\latest.txt

Reply with quote

Reth
Guest

.\ not working for current dir when using WinSCP.com

Thank you very much! Yep, filemask threw me off. :D – Works perfectly now! :)

Reply with quote

Advertisement

You can post new topics in this forum