The pre-disconnection time was written into the XP environment of the Plan disk fragment: http://blog.csdn.net/scz123/archive/2005/07/05/414417.aspx. At that time, I was wondering if I could perform disk detection?
You can use the chkdsk. EXE command to perform disk detection. However, some disk commands may prompt you when checking some disk commands, and the plan may be faulty.
D:/> chkdsk D:/R/x
The file system type is NTFS.
The current drive cannot be locked.
The chkdsk cannot be run because another process is using this volume.
Are you planning to check this volume the next time the system restarts? (Y/N)
The cursor stops there, unless you manually enter it, which is of course not in line with the automation of the plan.
When I learned about Linux yesterday, I used the input and output redirection: symbol> for the output redirection. Symbol <indicates the input direction. This output is often used in windows. Today, I tried the input redirection in Widnows, but I didn't expect it to work. Well, you don't have to laugh. You don't know it if you don't use it. It's not too late to know it now.
Therefore, a batch is written and used as a scheduled task call:
Checkdisk. bat
Echo y> ans.txt
Chkdsk D:/R/x <ans.txt
Del ans.txt/Q
You have run the following commands to achieve the expected results. You do not need to manually enter "Y:
D:/> echo y> ans.txt
D:/> chkdsk D:/R/x <ans.txt
The file system type is NTFS.
The current drive cannot be locked.
The chkdsk cannot be run because another process is using this volume.
Are you planning to check this volume the next time the system restarts? (Y/N)
The volume will be checked the next time the system restarts.
D:/> Del ans.txt/Q
D:/>
Therefore, there is no problem with pulling the scheduled task. Of course, if the volume is being used, the disk detection can only be solved by restarting. As for how to set a scheduled task, I will not talk about it more here.