Windows7 system comes with CMD commands to copy and delete folders

  
Sometimes there are some stubborn files or folders we always let you delete, don't worry, in fact, the CMD command that comes with Win7 system can solve this problem very well. The following small series will introduce you how to copy and delete folders with CMD commands under windows7. If I want to copy the file folder of the f drive to the root directory of the c drive, how to use the cmd command to achieve it? Very simple: xcopy f:\\file c:\\file /e If you want to delete it? Also simple: Assume that the 123 folder del/s/qd under the d drive is deleted: \\123\\*.* ---- (used to delete the subfile under the folder) rd/s/qd:\\123 --- - (used to delete the folder) /s parameter for the subdirectory /q parameter is not to confirm the deletion of the file with the del command, then, is not like the ren command to eat files and folders, del can also delete files What about clips? The answer is no, because the delete folder must use the rd command, which is called the industry has specialization ^ _ ^. Another way to write rd is rmdir, which comes from ReMakeDirectory. The method used is also very simple: rd folder name can be, for example: rd test. It supports folder names with paths, for example: rd d:\\test. Sometimes, rd doesn't do a good job: you let it delete the test folder, but it arrogantly turns to you: the directory is not empty. However, this can't blame it for being lazy and not working, but its temper is a bit strange: if there are sub-files under the folder to be deleted, you have to give rd a top hat, add a /s parameter, it will be high I am happy to help you with things, so the correct way is: rd /s test. If you are a complete slacker, just use rd /s test, you may not be satisfied with it, because when you delete the folder with the subfile, CMD always stops at the moment and asks diligently. You: Do you want to confirm (Y/N)? You have to wait for you to lose a character and press Enter. Life can not blame the government, can not blame the society, who called rd has such a great power, once it is playing rogue, it can not stop anyone's — & mdash; rd risk, delete must be cautious. Fortunately, Microsoft is very considerate to those who are very confident and too lazy to delete, and provides a very convenient parameter /q, which is taken from quiet, the official explanation is: quiet mode, with /S to delete the directory tree is not required confirm. Try again this time: rd /q /s test, the real one is: the finger is flicking, the smoke is gone, is there a sense of ambiguity?
Copyright © Windows knowledge All Rights Reserved