Is there a timeout for a batch file?

I am using a bat file on a Windows 2000 SP4 server to copy database files when the database is closed. As soon as the bat file falls into the xcopy command, it executes a copy, but never returns to the bat file to continue working with other commands (starting the database, etc.). It should be noted that xcopy takes several hours. Is there some kind of timeout or max time with bat files? This is normal? If so, is there any way around this?

+3
source share
5 answers

Batch files do not time out. It looks like you can run a tooltip from XCOPY, for example, the "Are you sure" prompt.

Make sure you add the necessary command line switches to XCOPY to disable it.

, :

-Y to suppress prompts about overwriting files

-C continue even if errors occur
+4

, , XCOPY.EXE XCOPY.BAT - . ( , CALL)

, XCOPY.

+2

backup.log? , STDOUT , STDERR - 2 > & 1 , , .

+1

-, .bat .cmd. , , ? ?

0

XCOPY is kind of old. It is recommended that you use ROBOCOPY instead, but when you see how you are using the old server, make sure you start it with the -Y and -C perimeters, although this might give you some problems in the long run.

-1
source

Source: https://habr.com/ru/post/1699052/


All Articles