Need help with script -
Hi Admins,
Newbie here.
Maybe you guys can help.
[code]
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\ftp2\WinSCP.log" /ini=nul ^
/command ^
"open ftp://mysite:[email protected]/" ^
"synchronize remote -mirror \\<My local share>\path\xyz\abc /temp"" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
[/code]
Guys I am simply trying to sync my \\localshare path\ with the remote dirctory on "mysite"
And keep on getting:
[code]
. 2016-09-16 19:04:00.386 Error listing directory '/temp ^'. ("Could not retrieve directory listing","Failed to change directory.")
< 2016-09-16 19:04:00.386 Script: Error listing directory '/temp ^'.
< 2016-09-16 19:04:00.390 Script: Could not retrieve directory listing
< 2016-09-16 19:04:00.390 Failed to change directory.
. 2016-09-16 19:04:00.405 Script: Failed
. 2016-09-16 19:04:00.405 Script: Exit code: 1
. 2016-09-16 19:04:00.407 Disconnected from server
[/code]
I have made the temp directory on the remote server so I know its there, why can't my script find it, even though it connects just fine? Please help, ..
Basically, I want to:
a) copy all files from my \\share to the remote directory \\temp
b) schedule a batch job to keep the files insync
Thats all.
Let me know if you guys can help me with the script, thanks.[/code]
Newbie here.
Maybe you guys can help.
[code]
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\ftp2\WinSCP.log" /ini=nul ^
/command ^
"open ftp://mysite:[email protected]/" ^
"synchronize remote -mirror \\<My local share>\path\xyz\abc /temp"" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
[/code]
Guys I am simply trying to sync my \\localshare path\ with the remote dirctory on "mysite"
And keep on getting:
[code]
. 2016-09-16 19:04:00.386 Error listing directory '/temp ^'. ("Could not retrieve directory listing","Failed to change directory.")
< 2016-09-16 19:04:00.386 Script: Error listing directory '/temp ^'.
< 2016-09-16 19:04:00.390 Script: Could not retrieve directory listing
< 2016-09-16 19:04:00.390 Failed to change directory.
. 2016-09-16 19:04:00.405 Script: Failed
. 2016-09-16 19:04:00.405 Script: Exit code: 1
. 2016-09-16 19:04:00.407 Disconnected from server
[/code]
I have made the temp directory on the remote server so I know its there, why can't my script find it, even though it connects just fine? Please help, ..
Basically, I want to:
a) copy all files from my \\share to the remote directory \\temp
b) schedule a batch job to keep the files insync
Thats all.
Let me know if you guys can help me with the script, thanks.[/code]