Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

usa

Thanks!
martin

Re: put -delete \\myshare\fullpath1\*[.]* /fullpath2/

I actually got completely confused. The dot has a special function in operation masks only, not in file masks and moreover this is a local file mask, which does not even support the set-syntax []. So WinSCP behaves as designed.

I have updated respective comment in put command documentation:
The Windows wildcard supports * and ? only. If you want to use a full syntax of file masks, use a -filemask switch.

https://winscp.net/eng/docs/scriptcommand_put#fn1
usa

Nevermind. I've just understood what you mean.
usa

I am glad to surprise you :-)

Do you mean that in order to transfer all the files without directories I should transfer their parent directory non-recursively?
usa

PS: The latest Version 5.7 (Build 5125) has this issue too.
usa

put -delete \\myshare\fullpath1\*[.]* /fullpath2/

In a local directory named "\\myshare\fullpath1\", I've got:
1) A regular file named "test.txt".
2) A subridectory named "subdirectory".

put -delete \\myshare\fullpath1\*[.]* /fullpath2/
uploads nothing, but should upload "test.txt" only.

put -delete \\myshare\fullpath1\*.* /fullpath2/
uploads both the file and the directory, and this is the expected behaviour.

So, how do I upload files only?
It's OK to upload only files with extensions.

PS:
Windows 7 x64
WinSCP, Version 5.5.6 (Build 4746)
Runs from 64-bit cscript.exe, VBScript.