Post a reply

Options
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)

Options

Topic review

rommy

Actually this script can't run, because the folder is spaced
example
"C:\Computer Vision"

Please Help this case
martin

Re: Bacth File Can't Run

The script looks good. If it does not work for you, we need to know what exactly fails, what error do you get, and a log file.
rommy

Bacth File Can't Run

(admin note: Sorry, I've deleted your post by mistake. Though I had a copy of the batch file, so I'm restoring at least that)

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="F:\Backup\WinSCP.log" /ini=nul ^
/command ^
"open sftp://fiberone:Fiberone20%%215@172.17.30.12/ -hostkey=""ssh-rsa 3072 nV1bIT+VXb0DGmUe7BY4Yr75D2A4Fh+WyjszJjw4Yz4=""" ^
"synchronize local F:\Backup /FiberOne/Computer Vision/Shapefile/Landuse/BAS" ^
"exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)

exit /b %WINSCP_RESULT%