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

Need to Change file name for some specific files whose starting is same letters

@echo off
"C:\Program Files (x86)\WinSCP\" ^
  /log="C:\Program Files (x86)\WinSCP\logs\AutoTransfer.log" /ini=nul ^
  /command ^
    "open sftp://serverdetails/ -hostkey=""ssh-rsa 2048 XXXXXXX""" ^
    "lcd E:\DSU\serverdetails\usr\sftpuser\DSU\DATA\OUT" ^
    "cd /EInvoice" ^
    "put -rawtransfersettings[1] FileNameCase=1 Documents_Action_*.* " ^
    "put -rawtransfersettings[1] FileNameCase=0 *.* " ^
if %WINSCP_RESULT% equ 0
 echo Success
 echo Error

I am using above script to move file automatically to Remote directory through WinSCP.
But in local directory there are multiple files which are starting from same letters (Documets).
I want to move some specific files (Documents_Action) to be in upper case while transferring remote directory.
Currently both files are moving in but (Documents_Action) is moving in both type "uppercase" and "no change".

Please help