Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Create a batch file (hw3_yourlastname1.bat) which will schedule tasks on the

ID: 3590210 • Letter: 1

Question

1. Create a batch file (hw3_yourlastname1.bat) which will schedule tasks on the system using Windows 7’s Scheduled Task Console utility - schtasks (60%)

Your batch file (hw3_yourlastname1.bat) will include instructions to do the followings:

i. List the directories and files in the current directory

ii. Pause the script to see the list of directories and files

iii. Clear the screen iv. Pause the script

v. Schedule a task to start Check Disk (chkdsk.exe) every Friday at 5:30pm using Scheduled Task Console

vi. Schedule a task to start Disk Defragmenter (dfrgui.exe) every 1 st day of a month at 11:30pm using Scheduled Task Console

vii. Display all the scheduled tasks on the system

viii. Pause the script to see the list of scheduled tasks

Explanation / Answer

@echo off
for /r %%a in (*) do echo %%a >> get_files.txt %% this line of code brings all the file and folder
type get_files.txt %% this line store the file and folder details in .txt file and show
pause %% Pause
test&cls %% Clear the Screen
pause %% Pause
echo y | chkdsk.exe c:1 %% Task Scheduler set with the command for Check Disk
echo y | Defrag.exe c:1 %% Task to Defrag command set in Task Scheduler

ECHO Task to Check Disk %% Print the task that we have to perform in the script
ECHO Task to Defrag %% Print the task that we have to perform in the Script
pause %% Pause

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

If any futher details need i am ready to provide