Post a reply

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)


Topic review


Re: command prompt won't exit

You have a tab character at the end of the mv line:
    "mv *.txt Archive/" ^   

It breaks the line spanning in the batch file:

Edit: Ok, I didn't notice that you have resolved this on your own :)

Found my error

Found the error. had a space after one of the ^

command prompt won't exit

I have a batch file that runs and completes, but the command prompt will not exit, I have the exit command there, but I still end up with winscp> with an open command prompt. Below is my script. I've xxxx out all the FTP site info. I've also included a picture. What am I missing?
@echo off
"C:\Program Files (x86)\WinSCP\" ^
  /log="C:\Temp\WinSCPLog\!S.log" /ini=nul ^
  /command ^
    "open s -hostkey=""xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=""" ^
    "lcd C:\Temp\POFILE" ^
    "cd /IN" ^
    "get *.txt" ^
    "mv *.txt Archive/" ^   
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error