• 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
#1
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.
 
T

toxicity

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

Hipster Doofus

Good grief Charlie Brown
#4
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.
 
R

rettahc

Guest
#8
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.
 
R

rettahc

Guest
#9
Ahh found something!!

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

rettahc

Guest
#12
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
#13
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. :)
 
#14
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.
 
E

eNuffSaid

Guest
#15
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
#16
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:
 
E

eNuffSaid

Guest
#18
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 ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies