How to take a path including special char like (C:\WIN & SCP\Audit\)
Hi Team,
Greetings!!
I have two bat files one is to create parm parameters for Winscp and another one is for WinSCP execution.
Here the problem is first bat file is working smoothly and giving 4 parms to Winscp (i.e: USER, "remote path", "local path", "local variable").
Here my script is with example sites :
this below line is the end of example1.bat having it will trigger example2.bat with following /parms
example2.bat is having below script
Here the problem is @lcd the path is not taking whenever it's having special char in the path like (C:\WIN & SCP\Audit\)
I tried to give with double quotes & single double quotes.
please help me with this.
Thanks
hemanth kumar
Greetings!!
I have two bat files one is to create parm parameters for Winscp and another one is for WinSCP execution.
Here the problem is first bat file is working smoothly and giving 4 parms to Winscp (i.e: USER, "remote path", "local path", "local variable").
Here my script is with example sites :
this below line is the end of example1.bat having it will trigger example2.bat with following /parms
./example2.bat %USER% %RemoteFolder% %localvariable% "%Localpath%"
example2.bat is having below script
@echo off "C:\Users\WinSCP.com" ^ /log="C:\WinsCP.log" /ini=nul ^ /command ^ "open ftp://%1%@example.com/" ^ "lcd %4%" ^ "cd /home/%1/drive/%2" ^ "cd output" ^ "get file1.txt %3%%TIMESTAMP#yymm%%file1.txt" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
Here the problem is @lcd the path is not taking whenever it's having special char in the path like (C:\WIN & SCP\Audit\)
I tried to give with double quotes & single double quotes.
please help me with this.
Thanks
hemanth kumar