How secure move file
Posted: 07 Oct 2010 00:54
Hello everybody,
I have this 2 batch
the first batch run each time a new file come is a specific directory and make a queuing copy, this batch runs several times in a day randomly
The second batch do only 1 operation, precisely move 1 time a day at scheduled time the result of the copy %SND%\F\cumulativefile.txt to another directory to consolidate the data
My question is how can run the second batch safety without overlap with the first copy batch
Regards
Dario
I have this 2 batch
the first batch run each time a new file come is a specific directory and make a queuing copy, this batch runs several times in a day randomly
Code: Select all
FOR %%x IN (%SND%\*) DO FOR /F "tokens=3 delims=." %%y IN ('DIR /B %%x') DO FOR /F "tokens=1 delims=;" %%z IN ('FINDSTR %%y %SCRIPTS%\c.txt') DO (
IF NOT EXIST %SND%\F\%%y TYPE NUL > %SND%\F\%%y
COPY /Y /B %SND%\F\%%y+%%x %SND%\F\%%y > nul
DEL /Q %%x
)
The second batch do only 1 operation, precisely move 1 time a day at scheduled time the result of the copy %SND%\F\cumulativefile.txt to another directory to consolidate the data
My question is how can run the second batch safety without overlap with the first copy batch
Regards
Dario