Joined
·
61 Posts
I am having difficulty with these batch files so I was wondering if
I can get some help.
I am trying to create three different batch files that will do the following.
I have a .vbs script that will defrag 30 computers remotely and
would like it to copy the .vbs script and run on each individual pc.
using the at command. Within this batch file I want to also create a at command that will allow each defrag job to run interactively.
I have another batch file that I want the at command to run command line defrag utility with the analyze option and export the results to log file.
I have the third batch file to run command line defrag utiltiy with analyze option and export results to log file 2.
so it goes like this-defrag.bat will include the actual job that will be ran on the remote PC's, this is what I have so far...
@echo off
rem this batch file program defrags users hard drives on remote desktops.
rem It is named defrag.bat
Rem ail00003240053
set %AT RUNTIME%= TIME TO RUN DEFRAG
SET %EDOSWNAME%=ail00003240053
REM COPY DEFRAG.VBS \\%EDOWSNAME%\ %SYSTEMDRIVE%
C:\>defrag c: -a -v > defrag.log
C:\>at \\ail000003240053 12:02 /INTERACTIVE %systemdrive%\defrag.vbs Added a new job with job ID = 1
Can anyone tell me what I am doing wrong with the syntax in this first batch job?
Also how do I write the batch job for the other two jobs
I want to create?
Can anyone help me?
I can get some help.
I am trying to create three different batch files that will do the following.
I have a .vbs script that will defrag 30 computers remotely and
would like it to copy the .vbs script and run on each individual pc.
using the at command. Within this batch file I want to also create a at command that will allow each defrag job to run interactively.
I have another batch file that I want the at command to run command line defrag utility with the analyze option and export the results to log file.
I have the third batch file to run command line defrag utiltiy with analyze option and export results to log file 2.
so it goes like this-defrag.bat will include the actual job that will be ran on the remote PC's, this is what I have so far...
@echo off
rem this batch file program defrags users hard drives on remote desktops.
rem It is named defrag.bat
Rem ail00003240053
set %AT RUNTIME%= TIME TO RUN DEFRAG
SET %EDOSWNAME%=ail00003240053
REM COPY DEFRAG.VBS \\%EDOWSNAME%\ %SYSTEMDRIVE%
C:\>defrag c: -a -v > defrag.log
C:\>at \\ail000003240053 12:02 /INTERACTIVE %systemdrive%\defrag.vbs Added a new job with job ID = 1
Can anyone tell me what I am doing wrong with the syntax in this first batch job?
Also how do I write the batch job for the other two jobs
I want to create?
Can anyone help me?