Close command prompt window after batch file execution

kreya

How to automatically close command prompt window after batch file execution.

I tried command Start "" & Exit 0 but it's not working.

Start ""
@ECHO OFF
C:
cd c:\wamp\www\phpfile
php genCSV.php
"c:\program files\coreftp\coreftp.exe" -s-O -site UPLH -u D:\Files\out\*.*   -p /Import/
del /Q c:\wamp\www\txt\*.*

Solution

I used "exit /B" at the of script as per Joey's below answer.

Joey

If you really want to close even an interactive session, then just use exit. Generally though, e.g. from Explorer, batch files are started with cmd /c which will close the console after the batch file completes.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

close batch file after execution in java

From Dev

How to Close the CMD prompt window after successfull execution of VBScript

From Dev

Close cmd window after Git command in batch script

From Dev

Batch script to close desired Command Prompt windows

From Dev

Is there a Keyboard shortcut to close a Command Prompt window?

From Dev

Set window defaults when opening a command-prompt from a batch file using different creds via RunAs

From Dev

Rgd Window Batch File Command

From Dev

using a batch file to run a ps1 file but hide the command prompt after start?

From Dev

Need Batch File to close a Window.. NOT the batch window

From Dev

Glassfish asadmin batch file not opening command prompt

From Dev

How to hide command prompt for batch file

From Dev

Batch file executing differently than command prompt

From Dev

How to use "<<" in batch file or command prompt?

From Dev

CMD Command Prompt DIR Batch File

From Dev

batch to run php file from command prompt

From Dev

Close folder's window with batch file

From Dev

--shell stops execution, for Command Prompt, Batch files, PHP exec(), and more

From Dev

Use window command prompt split text file

From Dev

cmd command execution using batch file

From Dev

Remove the close option on a batch file with a command, is it possible?

From Dev

How to wait for file to close in batch file than proceed for execution

From Dev

how to prompt "open file window" from command prompt in java?

From Dev

Composer exit batch file after finish execution

From Dev

Getting input data after execution of batch file

From Dev

Make ConEmu close after exiting batch file

From Dev

hide command displaying in command prompt while running batch file

From Dev

How to close command prompt?

From Dev

Windows batch start command and ECHO on completion and close the cmd's window

From Dev

Create batch File to run one time and exit comand prompt window

Related Related

  1. 1

    close batch file after execution in java

  2. 2

    How to Close the CMD prompt window after successfull execution of VBScript

  3. 3

    Close cmd window after Git command in batch script

  4. 4

    Batch script to close desired Command Prompt windows

  5. 5

    Is there a Keyboard shortcut to close a Command Prompt window?

  6. 6

    Set window defaults when opening a command-prompt from a batch file using different creds via RunAs

  7. 7

    Rgd Window Batch File Command

  8. 8

    using a batch file to run a ps1 file but hide the command prompt after start?

  9. 9

    Need Batch File to close a Window.. NOT the batch window

  10. 10

    Glassfish asadmin batch file not opening command prompt

  11. 11

    How to hide command prompt for batch file

  12. 12

    Batch file executing differently than command prompt

  13. 13

    How to use "<<" in batch file or command prompt?

  14. 14

    CMD Command Prompt DIR Batch File

  15. 15

    batch to run php file from command prompt

  16. 16

    Close folder's window with batch file

  17. 17

    --shell stops execution, for Command Prompt, Batch files, PHP exec(), and more

  18. 18

    Use window command prompt split text file

  19. 19

    cmd command execution using batch file

  20. 20

    Remove the close option on a batch file with a command, is it possible?

  21. 21

    How to wait for file to close in batch file than proceed for execution

  22. 22

    how to prompt "open file window" from command prompt in java?

  23. 23

    Composer exit batch file after finish execution

  24. 24

    Getting input data after execution of batch file

  25. 25

    Make ConEmu close after exiting batch file

  26. 26

    hide command displaying in command prompt while running batch file

  27. 27

    How to close command prompt?

  28. 28

    Windows batch start command and ECHO on completion and close the cmd's window

  29. 29

    Create batch File to run one time and exit comand prompt window

HotTag

Archive