Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct DEL Syntax in Autoexec.bat to bypass Confirmation ? 1

Status
Not open for further replies.

DRAMO4298

Technical User
Nov 23, 2001
85
US
Hello:

In my autoexec.bat file, I have (five) DEL commands to cleanup some directories before WIN95-b starts up.

During bootup, when it reaches each of these DEL commands, the bootup stops and asks me the following . . .

"All files in directory will be deleted!
Are you sure ( Y/N )?"

Then, I have to type in Y and press ENTER . . . each of the five times.

QUESTION:
Is there a SWITCH, or some way to write these DEL lines that will automatically tell the computer that YES I do want these files deleted . . . "just do it without ASKING me if I am sure !!!!"

Then, my bootup will continue without my presence or having to stop at these DEL commands.

MY MACHINE:
Intel Pentium II, MMX, 300MHz
Windows 95-b OEM ( OSR2.5 ) 4.03.1212

Thank you.
 
PIPE in your "Y" before the other command ... ie,
ECHO Y | DEL C:\WINDOWS\TEMP\*.*
 
Hello GARGOUILLE:

Thank you for the reply - I will try your solution . . . however, I just used the following TWO wildcards and BOTH of them worked.

*?.* ( and )
?*.*

Examples:

DEL C:\WINDOWS\TEMPOR~1\*?.*
DEL C:\WINDOWS\TEMPOR~1\?*.*

I never got the ( Y/N ) CONFIRMATION and bootup continued right through.
All the files in the directories were deleted.

I will also try your solution . . . thanks again.
 
'Course we know this is VERRRYYYY dangerous stuff, right?
It'll also work without the ?
 
Hi GARGOUILLE:

I agree - dangerous and confusing.
I've been trying to delete the "index.dat" and "internet files" from the following folders using Autoexec.bat . . .

C:\Windows\Cookies
C:\Windows\History
C:\Windows\History\History.IE5
C:\Windows\History\History.IE5\Mshist~1
C:\Windows\Tempor~1
C:\Windows\Tempor~1\Content.IE5
C:\Windows\Tempor~1\Content.IE5\5u969ysf
C:\Windows\Tempor~1\Content.IE5\ighr1nij
C:\Windows\Tempor~1\Content.IE5\k1q38dun
C:\Windows\Tempor~1\Content.IE5\y5r1eis2

Since I backed-up my ENTIRE computer onto 11-CDR disks, I felt safe making some errors in the above "attempts" . . .

however, after running into a little trouble and COPYING back all the files/folders from my backup CDR to C:\WINDOWS\TEMPORARY INTERNET FILES . . . seems like this TEMPORARY Internet Files is (not) detecting any files from C:\Windows\COOKIES.

Nor is C:\Windows\Temporary Internet Files (re-building) the "index.dat" file after I delete it from autoexec.bat. I read that EXPLORER REBUILDS FOUR "index.dat" files after they are deleted while in DOS MODE. (??????)

Is that "Windows Explorer" or "Internet Explorer" ( ???? )
I have Internet Explorer 5.50.4807.2300

C:\Windows\HISTORY is detecting everything correctly.

Today makes 4th day trying to create the "correct" autoexec.bat to do all the above.

Any help would be appreciated. :>) THANK YOU.
 
MORE INFORMATION to be added to "New Thread" titled . . .

"Temporary Internet Files not Rebuilding INDEX.DAT ?"
 
I'm gonna post to this message instead of the new 1:

I only meant to give you an example of the code...not the path, and shoulda' pointed that out when posting.
Index.dat not rebuilding on reboot is wrong...it should do this.
IF IE is not "built in" you may be offered the repair option for it...in Add/RemovePrograms...tricky, but highlight and right click it and you may be offered the chance to repair it.
I admire your pluck, but there's a file called delindex.bat that's circulating that will give you invaluable help in getting to your goal.
My system and this hokey/backwoods/dialup ISP isn't taking me where google.com says it is...(finally did get thru by redialing 'til I got a faster router!)
Take a look at it.
 
Hi GARGOUILLE:

Once again, it seems, I solved my problem before getting back to these posts . . . but am still very grateful to you for sending info and advice.

It seems that when UPGRADING Internet Explorer from 4.0 to 5.5 . . . the upgrade placed the NEW "Temporary Internet Files" (folder) into C:\WINDOWS\LOCAL SETTINGS.

The C:\WINDOWS\TEMPORARY INTERNET FILES must be there from the install of IE4.0 (which I have now completed deleted from C:\WINDOWS).

Everything is now doing what I wanted by changing/adding these lines to autoexec.bat . . .

deltree /y c:\windows\cookies\*.* > NUL
deltree /y c:\windows\history\history.ie5\index.dat > NUL
deltree /y c:\windows\history\history.ie5\mshist~1\index.dat > NUL
deltree /y c:\windows\LOCALS~1\tempor~1 > NUL


When WINDOWS starts up after this - the Temporary Internet Files in C:\WINDOWS\LOCAL SETTINGS are recreated . . . along with the INDEX.DAT and DESKTOP.INI (files).

Thank you, once again . . . and I will still check out those references you posted (can't know too-much). :>)

Best regards, Richard (NYC - USA)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top