PDA

View Full Version : Batch file to check file size


kudass
08-08-2008, 09:29 AM
I am currently trying to create a batch file to rename a log file to if it exceed 200kb. can anyone help me out.

i can rename the file with this command.

for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "send.log" send%%e-%%f-%%g.log



but can anyone tell me what command to use for batch file to check it the log file exceed 200kb.



thanks in advance.

Krupux
08-08-2008, 06:32 PM
Got it from google, might help you:

http://www.ericphelps.com/batch/samples/filesize.txt

kudass
25-05-2009, 09:00 PM
was doing a review when i saw the reply. thanks alot. it did help me in solving the problem.