Computing.Net > Forums > Disk Operating System > batch file

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

batch file

Reply to Message Icon

Original Message
Name: Mark
Date: April 17, 2002 at 11:32:40 Pacific
Subject: batch file
Comment:

I would like to know (in windows 98) if there is way to run
a batch file within a login scipt that will automatically delete files with the .pst extension. The PST files are located somewhere on the C drive (no specific folder)so I would need it to search the entire drive and then delete them.
I got it to work in Win NT only..


Report Offensive Message For Removal


Response Number 1
Name: Secret_Doom
Date: April 17, 2002 at 12:33:19 Pacific
Reply: (edit)

What do you mean by "I got it to work in Win NT only.." ? You mean you've already done that task on WinNT, and need the batch file to Win9x, or you need the batch only for WinNT?

I think that in WinNT you may use FOR/R:

FOR/R C:\ %%F IN (*.PST) DO DEL %%F

That actually command works for Win2000, I'm not sure it will work on WinNT. That command line is for using in a batch file. If you desire to type and enter it directly on the prompt, replace "%%F" by "%F".

On Win9x it's a little more difficult. Visit the following URL:

http://groups.google.com/groups?hl=pt&selm=a45gl1%241c94t9%241%40ID-55970.news.dfncis.de&rnum=5

This is a post from Willam Allen, which the script you need (that would be the first script, there are two). It's a great script.

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


Report Offensive Follow Up For Removal

Response Number 2
Name: Mark
Date: April 17, 2002 at 13:00:00 Pacific
Reply: (edit)

Yes I got it to work in NT by using
del \*pst /s /q /f>nul2>&1.. (I think thats
correct)
This line will not work in Win 98.

Since I don't know where the .pst files are located(because the users move them) I want to run a
complete check of the entire disk to delete
them..
thanks
I'll check out the URL but it looks like it
wants specific folder names to search


Report Offensive Follow Up For Removal

Response Number 3
Name: Secret_Doom
Date: April 17, 2002 at 19:21:51 Pacific
Reply: (edit)

Use the _FIRST_ script, which will search on the entire C:\ (or specify %base% as C: on the second script)

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br



Report Offensive Follow Up For Removal

Response Number 4
Name: Michael
Date: April 18, 2002 at 06:21:15 Pacific
Reply: (edit)

Also there is a set of utilities called batpower that has a program called sweep, which allows you to perform any command on the entire drive... Download batpower here:
http://users.aol.com/dosware/batpower.zip

HTH,
Michael


Report Offensive Follow Up For Removal

Response Number 5
Name: Mark
Date: April 19, 2002 at 07:10:45 Pacific
Reply: (edit)

Batpower works but it errors out at the end with memory error.
Is it possible to create a batch file that will work in Win 95\98\NT\2000 that will search contents of C drive and rename files with certain extensions?? Without installing software on each PC?? I would rather have it delete but renaming the file would do...


Report Offensive Follow Up For Removal


Response Number 6
Name: Secret_Doom
Date: April 19, 2002 at 11:20:39 Pacific
Reply: (edit)

Disregard about the multi-os issue, using SWEEP.COM from batpower would require two files, since the file is compiled (so we can't make it run on a subroutine).

I believe using Willam Allem's post could be better at this, since it's not compiled, so you can modify it and write to it the command you want to be executed in each folder from root. Have you even looked at it man ???

Making batch scripts multi-os is always a challange. Test WA's script on NT system, it might work...

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


Report Offensive Follow Up For Removal

Response Number 7
Name: mark
Date: April 22, 2002 at 09:20:10 Pacific
Reply: (edit)

This is a script I am really not familar with..
Can you help me out and let me know where to subsitute the *.pst file in that script..And can I also tell the batch to delete two files.(*.pst and *.pab) ???


Report Offensive Follow Up For Removal






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software