1.

Solve : Help with deleting folders inside a folder using a batch file?

Answer»

I am using Windows XP SP2 spanish version and i want to delete the folders inside a specific folder using a batch file.

this is the folder that i want to clear of files and folders.

C:\Documents and Settings\myname\Configuración local\Archivos temporales de Internet\Content.IE5


the rmdir command will delete the Content.IE5 directory along with the files inside it and i don't want that. so any ideas in how can i do this?


also when ran a batch file with the command

dir C:\Documents and Settings\myname\Configuración local\Archivos temporales de Internet\Content.IE5

the "Configuración" "o" came out as a symbol so i am wondering why is that.del will delete the contents but not the actual directory which i think is what your after.. look up Code: [Select] del /?
FBQuote from: FIREBALLS on August 18, 2008, 02:50:00 PM

del will delete the contents but not the actual directory which i think is what your after.. look up Code: [Select] del /?
FB

del with only delete files right? i need to be able to delete folders too.seeing as you can't be bothered i'll do it for you:

Quote
c:\> del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete MULTIPLE files. If a
directory is SPECIFIED, all files within the directory
will be deleted.


/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
I Not content indexed Files L Reparse Points
- Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display SEMANTICS of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

FBAlso i'm not sure what the spanish is but i guess it's an error message cause when you USE adresses with spaces in you need to put them in quotes... Code: [Select] dir "C:\Documents and Settings\myname\Configuración local\Archivos temporales de Internet\Content.IE5"
FB


Discussion

No Comment Found