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

Advertisement

m-sonawane@eisai.co.in
Joined:
Posts:
4

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

@echo off
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /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 *.* " ^
    "exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 
(
 echo Success
)
 else 
(
 echo Error
)
 
exit /b %WINSCP_RESULT%
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

Reply with quote E-mail

Advertisement

Advertisement

You can post new topics in this forum