Jump to content

orphaned backup files


Recommended Posts

Posted

Hello,

 

I am looking for a way to search for and delete orphaned backup files over a series of approximately 150-160 project directories. Any help and/or insight would be appreciated.

 

Thanks,

Phil

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • sandiegophil

    12

  • Jack_O'neill

    9

  • ReMark

    7

  • SLW210

    2

Popular Days

Top Posters In This Topic

Posted

What methods have you tried so far to use to find these .bak files?

Posted

I have had zero success with any type of search/compare/list creation programs.

Posted

Simple enough with Windows Explorer, just navigate to the top directory and perform a search for *.bak and delete them.

Posted

The .bak files are created in the same folder that the original drawing is in.

Posted

I want to leave any .bak files that have matching .dwg files in place. My goal is to find any .bak files that do not have a matching .dwg file on a directory by directory basis. Employees will create temporary drawings for a specific use and then later delete it, but it leaves an orphaned backup file in the directory. Those are the files I am looking to find and delete.

 

Thanks,

Phil

Posted

As Patrick says, use your windows explorer to search for them. There are a couple of ways to do that. One, as he suggests, do an actual search. You can start that by hitting ctrl-f in the explorer window, or if you know which folder they are in already, simply navigate to the folder, then click on the word "type" on the menu bar just above where the files are displayed and it will sort by file extension. This will put all the .bak files together. If you have your explorer window set to show icons, you may need to click "view" and "details" first. Once they are sorted, you can click the first one, scroll down to the last one, hold the 'shift' key down and select the last one. This will highlight all the files between the first one you picked and the last one. You can then either right click and pick "delete" or hit the delete key.

Posted

It sounds to me as though you are now looking to play with fire. I'd be very careful about what you do next.

Posted

ReMark-

 

You're 100% correct. This is a dangerous venture. However, there are so many of the orphaned backup files that it would really free up a lot of server space.

Posted
I want to leave any .bak files that have matching .dwg files in place. My goal is to find any .bak files that do not have a matching .dwg file on a directory by directory basis. Employees will create temporary drawings for a specific use and then later delete it, but it leaves an orphaned backup file in the directory. Those are the files I am looking to find and delete.

 

Thanks,

Phil

 

You posted this a couple minutes before I hit the post button. You can still use the method I described, but sort by name instead of type. You'd just have to pick them out. There's a way to have all the files in a directory output to a comma delimited file which you can then sort with excel, but I can't recall how to do it right off the top of my head. I'll see if I can remember it and post it later.

Posted

Sort by name will work but who wants the tedium of going through the list of bak files to determine which are which? If that is a method you want to try then pick a single name followed by n underscore and number such as Mockup_1 or Temp_1 or Preliminary_1. The next person to come along and create a temporary drawing just indexes the number. Finding all the Temp_*.bak files will be a lot easier. Do it using a batch file. Hey Jack...you remember .bat files right?

Posted

I can port the file lists to excel but can't successfully compare the 2 lists containing 347,185 files in 48,857 directories. I think I may be attempting the near ridiculous.........

Posted

I end up with 2 lists by using: dir *.dwg /s>c:\drawings.txt and dir *.bak /s>c:\backup.txt

 

any help getting these 2 files to 'talk' and cancel each other out would give me a list I could do a batch delete from......... help!!

Posted

You have no set routine in place for cleaning out BAK files on a regular basis?

 

Does your IT department create nightly backups of all DWG files on the server?

Posted

Ok..had to go do it to remember.

 

Open a command prompt window and navigate to the directory you wish to sort. type in "dir/s>text.txt" You can substitute any name you wish for the word text. At any rate, this will give you a list of all the files and related information in a txt file. You can then open that file with excel as fixed width, which you can then manipulate with all the sorting and editing capabilities that excel has to offer.

Posted

no standard for cleaning house when I started. Our IT group creates the backups (very reliable)

Posted

you guys all type faster than i do

Posted

Are the backups created on a daily basis? Yes/No/I don't know?

 

If they are then I'd write a batch file that erases ALL bak files (created by AutoCAD) either at the end of each day or at the end of the week and run it religiously.

Posted
(sorry Jack)

:lol::lol::lol:

 

Nothing to be sorry for...anyway...take your two files, paste the files names from one into a column next to the names in the other, then take a look at this link for instructions on how to compare the data to find duplicates. You can use the find and replace tool to get rid of the file extensions in both columns, leaving you with only the actual name. Once you find and eliminate the file names that duplicate, what you have left should be the orphans.

http://support.microsoft.com/kb/213367?app=ZXL&ver=12

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...