Byterbit
Byterbit

Reputation: 75

How to close a command window after batch file

I have a batch process in Win 8 that changes to a directory, runs MS Access to produce a text file ( that’s HTML with data, thought that fun), then starts an FTP process calling a text file that manages the upload. At the end of this I’m stuck with an open command window. I’ve tried using “start” to start the ftp process, and I’ve played with using “exit” on the last line or not. Nothing is closing that window.

The File reads something like:

Cd\data
“c:\program files\office\msaccess” “c:\art\make_html_and_exit.mdb”
start ftp ftp.txt 
exit

The window stays open. As this must happen 4 times a day, I worry I'll annoy the user at the desk having to close the command window so often.

Yes, I know that this question has been covered before, but I can't get the window to close.

Upvotes: 1

Views: 2191

Answers (2)

Byterbit
Byterbit

Reputation: 75

This problem seems to have been caused by Logmein. When I was at the client’s site, the batch window closed fully. I then logged in remotely from a machine on the next desk and found the same failure to close.

Upvotes: 0

Stephan
Stephan

Reputation: 56180

It is your "ftp-window" which is not closing. Right? What are the contents of ftp.txt? The last line should be quit

By the way: you should call ftp with

start ftp /s:ftp.txt

(see ftp /?)

Upvotes: 2

Related Questions