I have created a batch file to remove thousands of files on my server. I use WinSCP to connect to my server.
The batch works fine, but when the filename has a UTF-8 symbol like é, è, à, the batch crashes, and the execution window is closed immediately (I can't read any messages).
winscp.com /command "open username:pwd@hostname" ^option utf on ^"rm /folder1/Deplacer-1025x150.svg" ^"rm /folder1/Déplacer-820x120.svg" ^exit
To run such a script, you must add a Path to your Windows Environnement.It's not DOS commands but WinSCP commands.del
doesn't exist but rm
yes.
With this script, the first file will be deleted but the batch will crash on the second. And impossible to run the batch again. I must disconnect from my FTP session and reconnect to be able to run the batch again (very weird)
How can I avoid crashing my batch with such a symbol? Is there an option to activate on the FTP server? How do we avoid closing the execution windows to be able to read any messages?
Thanks