CMD / BATCH FILE USEFUL CODE

:: check last server reboot date and time
systeminfo|find “Time:”

:: create empty file
COPY /y NUL %filePath% >NUL

:: check folder file count
SET /a fileCnt=0
FOR /f “tokens=* delims= ” %%a IN (‘DIR/s/b/a-d “%folderPath%”‘) DO ( SET /a fileCnt+=1 )
IF “%fileCnt%” NEQ “0” (ECHO Some files found)

Recent Posts

Recent Comments

Meta

Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *