sftp - Use path with spaces in batch file using WinSCP -


i have created winscp batch file deleting files on remote server. it's working fine, it's not working folder spaces.

for example, below batch file working:

cd c:\program files\winscp winscp.com /command ^     "open sftp://user:pwd@host" ^     "cd /home/test/desktop/india" ^     "rm int.txt" ^  

but below batch file not working

cd c:\program files\winscp winscp.com /command ^     "open sftp://user:pwd@host" ^     "cd /home/test/desktop/india & nepal" ^     "rm int.txt" ^  

i not able delete india & nepal folder file because of space

can 1 give solution?

wrap path spaces double double-quotes:

    "cd ""/home/test/desktop/india & nepal""" ^ 

see https://winscp.net/eng/docs/commandline#syntax


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -