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

martin

Re: Batch file needs to be run as administrator to work

"at the end of the batch file", not at the end of WinSCP command-line.

winscp.com /command ^
    "open ftp://xxxx:pw@mysite.com/" ^
    "option confirm off" ^
    "get xpress.zip" ^
    "put C:\Boodles\xpress.zip" ^
    "get xpress_qb.zip" ^
    "put C:\Boodles\xpress_qb.zip" ^
    "exit"
 
pause
rajitha1114

Re: Batch file needs to be run as administrator to work

Hi Martin,

Thank you so much for your response.
Even though I add a pause, it still closes. But surprisingly, it works when run it as admin.
Following is the edited script,

winscp.com /command ^
"open ftp://xxxx:pw@mysite.com/" ^
"option confirm off" ^
"get dkxpress.zip" ^
"put C:\Boodles\dkxpress.zip" ^
"get dkxpress_qb.zip" ^
"put C:\Boodles\dkxpress_qb.zip" ^
pause
martin

Re: Batch file needs to be run as administrator to work

Add pause at the end of the batch file to see its output (including any errors).
rajitha1114@...

Batch file needs to be run as administrator to work

Hi guys,

When I run my batch script, the cmd window opens & closes. It doesn't download the files.
But when I type the same commands in a command line (Without admin privileges), it executes successfully. And also, when I run the batch file as administrator, it works.
Can someone point me what I am doing wrong? Following is my simple script,

winscp.com /command ^
"open ftp://xxxx:pw@mysite.com/" ^
"option confirm off" ^
"get xpress.zip" ^
"put C:\Boodles\xpress.zip" ^
"get xpress_qb.zip" ^
"put C:\Boodles\xpress_qb.zip" ^
"exit"