Which Switch?

Hipster Doofus

Good grief Charlie Brown
Joined
12 May 2002
Messages
5,920
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?
 
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.
 
Another question>

Is there a way to delete folders that still have files in them?
 
you used to be able to use deltree but the DOS that XP uses doesn't support that command.
 
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.
 
Slowly getting closer. I have to remove the folder then create it again. :happy: w00t w00t
 
:( Now I need an exclude command. I tried EXCLUDE but no go. Need to delete files except .dat file.
 
Hmm, thats a tough one. Have you thought about maybe copying the .dat to another location, and then back after the delete?
 
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
 
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:
 
eNuffSaid I download a program called KiX2001_420.zip. Is that the one you are talking about?
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back