I am getting all files from a SFTP server with a script but I have to exclude a certain file type from download. For example
Thanks a lot for your help
-filemaskswitch? This is not mentioned in the documentation.
-delete -filemask <> *.tmp
*.*actually and use just
ABand the others start with the name
CD, and it only transfers the ones with the name
CDfiles are excluded for no reason.
DE, the same file is transferred without problems.
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\ep_depot\Temp\WinSCP.log" /ini=nul ^ /command ^ "open sftp://xxxxxxx/ -hostkey=""ssh-dss xxxxxx="" -privatekey=""H:\keys\SSH_private_key.ppk""" ^ "lcd ""H:\Forms\Forms\Final""" ^ "cd /DO" ^ "put *" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
/log=C:\path\to\winscp.logcommand-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.
You can post new topics in this forum