Jump to content

Batch file to remove files & folders?


TheTOM_SK

Recommended Posts

Hi, I have tried to get batch working for months, but nothing was not able to tell, what to do, even Google failed. Then I have found The Avenger and I used that one on XP to remove files, but since I have moved to Vista and that software does not work there, I have the same problem as I had before. I just need to know, how does it work, so I would be able to edit it. If you have any idea, please write it down.

Link to comment
Share on other sites


what are you trying to remove?

I did a clean instal of WinXP about once per week and The Avenger helped me to get rid of files like WMP's network sharing and other junk. An examle from Vista:

C:\Users\...\Favorites\Links
C:\Users\...\Favorites\Microsoft Websites
C:\Windows\Prefetch
C:\Windows\SoftwareDistribution

Edited by TheTOM_SK
Link to comment
Share on other sites

Well for starters deltree does not exist in windows xp or vista.

To delete files from subdirectory trees use del /s names

Deletes one or more files.

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

ERASE [/P] [/F] [/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

- 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.

to delete the directory tree and its contents use RD /s path

Removes (deletes) a directory.

RMDIR [/Q] [drive:]path

RD [/Q] [drive:]path

/S Removes all directories and files in the specified directory

in addition to the directory itself. Used to remove a directory

tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...