• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Which Switch?

Hipster Doofus

Good grief Charlie Brown
I'm making a cmd file to delete temp files from folders. What switch is used if any to stop being prompted with 'Are you sure (Y/N)?'.
I want it to continue deleting without the prompt.


sorry, cant answer your question. but im intrested in that file you made. you mind posting it?

Hipster Doofus

Good grief Charlie Brown
I've only got onto this in the past couple of days & it is very simple.

I've created a file to backup my entire system using xcopy. In the event of a mely down all I do is run it & my system is restored to a clean install state. Requirers dual booting though.

Also a backup file to create backups.

And now this one to delete files.
For this one open note pad & save it . I used Cleanup.cmd. Not a txt file but cmd)
First line = Echo off
Second line = del C:\Docume~1\Hipste~1\Locals~1\Temp\*.*
Last line = end
or you can put 'pause' to see what was what.

Just have to work out that yes/No business with the del one.


there used to be a util called deltree, but it look like XP dosent have it.
Umm, so try this one?
/s Delete specified files from all subdirectories.


Ahh found something!!

rmdir /s
Removes the specified directory and all subdirectories including any files. Use /s to remove a tree.


Hmm, thats a tough one. Have you thought about maybe copying the .dat to another location, and then back after the delete?

Hipster Doofus

Good grief Charlie Brown
I'm stumped too with this one. Can't find anything. It happening with temp internet files. Can't delete .dat because it is being used but can't find a way to skip over it. Ah well, have to keep looking & tryings. Thanx. :)
Hipster, only way i can think of to do that without deleting .dat files is going at it the manual way. sorting files by type, and jus highlighting the files you don't need.


Have you tried replacing "Hipste~1" with "%username%"?

Possible you could replace your second line with:
del \%TEMP%\*.*

Check "set" from the command promt for more info

If you really want to do some batch script magic, I suggest you look into Kix32 (freeware). It came with the WindowsNT4 CD if I remeber correctly, but should be readily downloadable from the iNet.

Good luck with your scripting.

Willem Moolenaar

Hipster Doofus

Good grief Charlie Brown
This is how it finally ended up>

del C:\Docume~1\Hipste~1\Locals~1\Tempor~1\ /S /Q

Don't know what is different from what I was trying before. Ran the command & suddenly the folder emptied leaving only the .dat file. Now putting 'end' on the last line it works perfectly, for me anyhow. With some of the other commands I have removed the folder then created it again. Might be the long way but at least it does what I want. :)
Thanx for all the help & suggestions everyone. :happy:


hahaha... well, you can see I've really been keeping in touch with things. Yes Hipster, that seems to be the way newer version of Kix32 (aka Kixtart). Thanks for the tip! :)

You've probably found it yourself but this seems to be their "home-page": http://www.kixtart.org/

Kind regards,
Willem Moolenaar

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member