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.

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)


Topic review


Re: Transfer files from Windows to Linux

You have the quotes wrong. And also there must be space after the quote before the D:\logs\*:
"put -filemask=""*>=1D"" D:\logs\* /linuxserver/logs/"


If this does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Transfer files from Windows to Linux


I'm trying to create a batch file to automate the process of log transfer of logs from Windows server to Linux server using WinSCP commands for logs that are greater than or equal to 1 day. I have the following command and it fails with the message "The filename, directory name, or volume label syntax is incorrect."

Can someone help with the correct syntax?

Below is the command.
winscp.exe /ini=nul /log=C:\winscp\winscp.log /command "open sftp://account@ip_address -privatekey="C:\privatekey.ppk"" "put -filemask="*>=1D "D:\logs\* /linuxserver/logs/" "exit"