Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Please excuse the newbie question. I find myself doing something completely out of my ken and would really appreciate any help you can give me. I'm one of the programmers a web-based application that runs on an NT server. We've found that its performance is seriously slowed by the log files created each time it is used. Now, I know nothing of NT, and am not in the same location as the server. (Well, I don't know "nothing" anymore, but close enough.)
What I need to do is to create a batch file that moves C:\theApp\WP*.job files to the D:\Old Jobs\ diretory. It should only move the files that were last modified more than 24 hours ago. The assignment is to execute the batch file when the server is rebooted, but given what I have learned about NT it sounds much wiser to use the Schedule service instead.
I am running serious into problems figuring out how to write the batch file since I don't have an NT machine. Obviously, I need to know the NT batch commands; so far, every reference I've looked at has said to look at the NT Commands help file for them. I can't do that. I'd greatly appreciate any help you could give me.
Thanks,
Angel

There is a product made by Wilson Window Ware called WinBatch. It would be the ideal solution to your problem. If you would like I will make an exe file to do what you like and you can use the scheduler service or Win AT commands to have it run once a 24 hour period. Email me and we will talk.

Thanks for your help, Anthony. I'm afraid that I can't use any utilities. Does anyone know where I can find documentation for NT batch commands (other than in the online help)?

You can read the syntax for XCOPY, AT, CMD with the Commandline-Interface in NT (MS-DOS).
You need to start the SCHEDULE-Service in NT
You need a Batch for Example:REM BACKUP.CMD
REM Batch to copy from C:\theApp\WP*. to D:\Old
xcopy c:\theApp\*.* d:\old\ /S/D
to use this batch use the COMMAND AT for Example
at 15:00 /every:date,M,T,W,TH cmd /C "c:\backup.cmd"Maybe, that the Syntax is not completly correct, because I use a German Version of NT

I'm having a similar kind of problem. I can shedule a task and so, but the task itself isn't quiet what I want.
I want to run a script that backs up only files older than seven days.I don't have any clue on how to substract in the command prompt.
I have already a line that sets the date in variables for the month and the day.
The batch version is used with 2 % signs and the command line one is with only one % sign.
for /f "tokens=1,2 delims " %i in ('date /t') do for /f "tokens=1,2,3 delims=/" %a in ("%j") do set month=%b
So here I set the month. If I use %a I set the day.
I was thinking of creating from which I read the "7 days before day" based on the current day. So this file could look like a list of all possible dates in the future followed by the date seven days before.
This is not the way of doing a good batch in NT, so if ANYBODY, and I mean ANYBODY has an idea, please help. I will post replies if I found a solution myself.Thanks

I run updates of a certain software frequently. It creates directories with older versions for rollback. I want to delete any more than 4 directories. How can I get a dos batch file to count directories and delete the oldest in an NT environment.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |