Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is it possible to keep open a DOS window after a batch file has finished executing?
I'm calling ftp from a batch file, and want to keep open the new window after the ftp session has ended. My current batch command is:
START ftp -n -s:%filename% %hostIP%
Thanks for any help,
James
OR, is there a way to copy the ftp screen printout to a file (i.e. pipe the ftp session in to a text file)??

Hi,
Right click on the shortcut you use to run the batch file (or on the file itself) and select Properties. Then on the Program tab uncheck the box Close window....
Good luck, Igor

Just so you know, you are using a Windows program (FTP.EXE) in a Windows environment. This does not belong to the DOS forum.

Thanks for the help Igor, but as you can see the batch file opens a *new* window with the START command - so changing the Windows settings won't work.
Anyone else?

Try making a separate batch file containing the line: START ftp -n -s:%filename% %hostIP% .
Name it something like STARTFTP.BAT
Then in your main batch file CALL the second one and when finished it should return to the first and stay open for further processing. For example:
call startftp.bat
Hope this helps, Good Luck

Just to clarify:
What you want to do is have a batfile that STARTs ftp.exe, and then ftp.exe should remain on-screen? In that case, changing the close windows setting for ftp.exe is the way to do it. ftp.exe is a windows program, and start runs a program separate from the current dos task. Whatever happens to the batch task after you have ran ftp.exe has no effect on ftp.exe.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |