Hi Dave,

Sorry I did not see your message earlier, I've been swamped at work and not
reading so much home email the past few days.  I'n now trying to catch up on
583 new emails.

Anyway, I wrote the original batch file about 20 years ago as a general
cleanup tool and modified it for just FM files about 15 years ago when I
started using FM.  I posted it on the list a few months ago when somebody
asked how to clean out the backup files from their FM directory.  The trick
to using it is that you have to be IN the directory where the FM files are.
To do that, open a DOS window (cmd.exe) from that directory, then run the
batch file.  If you just open a DOS window in its default directory
(windows\system32) it will try to find the .backup files there, and of
course, that doesn't work.

When I wrote the original batch file, the /s switch had not been implemented
in the DIR or DEL commands, so I used a freebee executable called sweep.com
to do the recursion and get any files in subdirs too.  But it's easier to
just use the /s switch as Syed as shown in his example.

However, I do not think it is necessary to check the list before deleting
backup files. I've never had my batch file  go wrong in 20 years, ever.
Unlike Syed, I use a batch file and do not type it in by hand each time.

Here's the batch file again.

@echo off
echo   Deleting the following files from the current directory:
dir *.backup.* *.lck
del *.backup.* *.lck

Let me know if you have any more questions about the file or how to use it.
BTW, if you just type the name of the original batch file CLEAN.BAT (also
attached) without any entries, it displays the help for the file.

Hope this helps,
Diane Gaskill

-----Original Message-----
From: framers-boun...@lists.frameusers.com
[mailto:framers-bounces at lists.frameusers.com]On Behalf Of
Syed.Hosain at aeris.net
Sent: Friday, February 22, 2008 11:51 AM
To: Eason, David; Bruce Foster; framers at lists.frameusers.com
Subject: RE: help needed with cleanfm batch file

Using a DOS Command Prompt window ... at the top of the directory tree
with all the FrameMaker documents (or at the root of the drive, if you
really want to do that ... carefully!):

1. First I verify which files are going to get deleted:

        dir  *.backup.*  *.lck /s

I check the dir listing result, and once I am sure that only the files
that I want deleted, will get deleted, I do:

        del  *.backup.*  *.lck /s

And they are gone! :) The "/s" searches subdirectories below the current
working directory ...

For safety, I use two DOS command prompt batch files ... so I do not
have to worry about typo's in what I type. For example, my batch file
(called "dback.bat") for the deletion has a single line in it:

        del  *.backup.*  *.lck  %1%  %2%  %3%  %4%  %5%  %6%  %7%  %8%

in it. Then I can add *more* files for deletion (like "*.lck" or
"*.tpdf" or "*.ps" ... always with care!) and can also add "/s" to get a
recursive deletion through the directory tree just by saying any of the

        dback  /s
        dback  *.tpdf
        dback  *.tpdf  *.ps
        dback  *.tpdf  *.ps  /s

and they all work fine for me.


Dave Reynolds wrote:
> Hi Folks
> A month or 3 ago someone posted a batch file to clean up Frame's
> and lock files from a folder.  I kept a copy of the batch file code,
> now that I want to use it, I can't find the instructions on how to use
> it.  My manual has expanded and now it is becoming tedious to manually
> delete all those .backup files.
> Any help would be appreciated.
> Cheers
> Dave

You are currently subscribed to Framers as dgcaller at earthlink.net.

Send list messages to framers at lists.frameusers.com.

To unsubscribe send a blank email to
framers-unsubscribe at lists.frameusers.com
or visit

Send administrative questions to listadmin at frameusers.com. Visit
http://www.frameusers.com/ for more resources and info.

Reply via email to