Yurek3 Posted August 12, 2006 Posted August 12, 2006 (edited) How write this skript for delete thisone folder of C;,D:,E:,F: etc.cmdow @ /HID@echo off rd "C:\Documents and Settings\Administrator" /s /qmd " C:\Documents and Settings\Administrator" Edited August 13, 2006 by Yurek3
Yurek3 Posted August 13, 2006 Author Posted August 13, 2006 (edited) I did thisone scriptcmdow @ /HID@echo off FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DOrd "%%i\Documents and Settings\Administrator" /s /qFOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DOmd "%systemdrive%\Documents and Settings\Administrator"And nextonecmdow @ /HID@echo off rd "C:\Documents and Settings\Administrator" /s /qmd " C:\Documents and Settings\Administrator"rd "D:\Documents and Settings\Administrator" /s /qmd " D:\Documents and Settings\Administrator"rd "E:\Documents and Settings\Administrator" /s /qmd " E:\Documents and Settings\Administrator"rd "F:\Documents and Settings\Administrator" /s /qmd " F:\Documents and Settings\Administrator"rd "G:\Documents and Settings\Administrator" /s /qmd " G:\Documents and Settings\Administrator"and nextcmdow @ /HID@echo off rd "%systemdrive%\Documents and Settings\Administrator" /s /qmd "%systemdrive%\Documents and Settings\Administrator" Edited August 13, 2006 by Yurek3
Tomcat76 Posted August 13, 2006 Posted August 13, 2006 Your scripts do different things and are sometimes inconsistent. The second part of the first is the strangest of all.I'm not sure of what you want to do but I assume that you want to delete them all and recreate them all.You can do that like this:FOR %%I IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ( IF EXIST %%I:\ IF EXIST "%%I\Documents and Settings\Administrator" ( RD/Q/S "%%I\Documents and Settings\Administrator" MD "%%I\Documents and Settings\Administrator" ))Whether it will work is something else. Isn't that folder protected?
T D Posted August 14, 2006 Posted August 14, 2006 What if we call our Documents and settings Users or something in winnt.sif?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now