1.

Solve : Help - script to rename file based on size?

Answer»

Dear Experts,

I'm new in DOS PROGRAMMING, so please HELP me to solve my issue.
I want to create script with these logic:
1. Check size file test.log,
2. if the size more than 500MB then close cmd.exe
3. rename the test.log became test.log.20130910 and move to archive folder
4. start the cmd.exe with execute program in the path C:\program\top.exe without close the window.
5 back to number 1. This process always repeated.

Really appreciate for any comment


Thanks
EdyQuote from: serpihankaca on September 10, 2013, 10:19:40 AM

This process always repeated.

Repeated FOREVER?

Do you want the repetition to be instant, or with a pause? If so, how long?Quote
if the size more than 500MB then close cmd.exe

You cannot execute dos commands without the window opened. You can have this part in VBS or something else, or you can have the window remain open.Quote from: Lemonilla on September 10, 2013, 01:36:04 PM
You cannot execute dos commands without the window opened.

I don't think that is what he means, but until he comes back we won't know.


Discussion

No Comment Found