Revit Backup Files

Revit Backup Files

JasonLLINDNER
Advocate Advocate
11,427 Views
8 Replies
Message 1 of 9

Revit Backup Files

JasonLLINDNER
Advocate
Advocate

Salute Experts

 

My project folder is so full with those ?????????????.001.rvt  and .rfa !!!

  1. Is there a way to sort out all the backup files Revit saves automatically in a separate folder where I don't mix them up with other files??
  2. If not.... is there at least a way to limit them to 1 or 2 backups per folder instead of indefinit? (one project went till 022.rvt!) 

Thanks for any suggestion

0 Likes
Accepted solutions (4)
11,428 Views
8 Replies
Replies (8)
Message 2 of 9

loboarch
Autodesk
Autodesk
Accepted solution
No way to re-direct the backups to another folder. You could write and schedule a batch file to move them for you if it was important enough.

As for limiting them you can set that in options in the save as dialog. Do a save as and then open options. There you can set the number of backups. You can even set it to 0 if the backup files really bother you and you like to live on the edge.


Jeff Hanson
Principal Content Experience Designer
Revit Help |
0 Likes
Message 3 of 9

RDAOU
Mentor
Mentor
Accepted solution

Hey @JasonLLINDNER

 

I do that using a batch file which cleans up the main folder and moves the backups to a separate folder...easy version can be as follows

  • Open Note Pad
  • Type in the following code

   move /-y "C:\LOCATION_PATH_OF_REVIT_PROJECT_FILE\*.00*.rvt" "C:\LOCATION_OF_BACKUP_FOLDER\BACKUP"

   pause


  • Save file close and rename it to BACKUP.dat
  • When prompted click Yes/save

Either run it manually to your liking or when the folder gets conjested with backups...Otherwise schedule it

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 4 of 9

JasonLLINDNER
Advocate
Advocate

Setting to zero is not an option so this batch file works ... Is there a way to do it without the DoS cmd window?

0 Likes
Message 5 of 9

RDAOU
Mentor
Mentor
Accepted solution

@JasonLLINDNER

 

The above code has been designated with pause just to make sure no errors occured and the  /-y is a security so that IF a file with the same name exists in the destination folder; it will prompt user to enter one of the following option (manually): Y (Yes); Overwrite – single file when prompted; N (No); Do not overwrite; A (All); Overwrite all files

 

If you are sure you want to overwrite existing files and certain that you don't want to see the CMD Prompt window or any possible errors; you need to

    1. replace /-y with /y to overwrite all files without prompting 
    2. add @echo OFF as first line to run the command in the background without opening CMD Prompt window 
    3. Remove the Pause at the end; this will close CMD Prompt window straight after the move command is executed. (Originally placed to allow user to see any errors before window closes)

@echo Off

move /y "C:\Project_Folder_Location\*.00*.rvt" "C:\BACKUP_Folder_Location"


PS: if you really want to execute it in the background, I would suggest the following:

  1. First rename current backup file and add the date YYYYMMDD to its file name (ex:  rename Practice_001.0006.rvt to Practice_001.0006.BKUP_20160410.rvt)
  2. keep the /-y in the move command (just in case! to make sure no file gets overwritten arbitrarily)
  3. add cleanup command that checks and deletes revit backup files older than 30 days in the backup folder and its subfolders

 


@echo off

rem Command renames backup files and adds BKUP_YYYYMMDD to files' name
ren "C:\Users\MINIJODA\Desktop\RVT PROJECT\*.00*.rvt" "*.BKUP_%date:~10,4%%date:~4,2%%date:~7,2%.rvt
goto Move

 

:Move

rem moves renamed backup files
move /-y "C:\Users\MINIJODA\Desktop\RVT PROJECT\*.00*.rvt" "C:\Users\MINIJODA\Desktop\RVT BACKUP"

goto 30DaysCleanup

 

:30DaysCleanup

rem deletes all .rvt files older than 30 days in the specified path including those in subfolders
rem forfiles [/p <Path>] [/m <SearchMask>] [/s] [/c "<Command>"] [/d [{+|-}][{<Date>|<Days>}]]
forfiles /p "C:\Users\MINIJODA\Desktop\RVT BACKUP" /s /m *.rvt /d -30 /c "cmd /c del @PATH"

 


 

NOTE:

  1. all line with rem are remarks (ie: can be deleted)
  2. the cleanup line deletes files permenantly (ie: NOT to Recycle Bin)
  3. file RevitBKUP.txt attached ... download and rename to RevitBKUP.bat
  4. don't forget to change the paths to suit your folder structure 😛

 

Enjoy

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 6 of 9

RDAOU
Mentor
Mentor
Accepted solution

@JasonLLINDNER

 

Forgot about the Scheduling...

 

 

  1. Open Task Scheduler by navigating the Windows Start menu to All Programs > Accessories > System Tools > Task Scheduler.
  2. Click Create Basic Task. This walks you through a simple wizard to set up the task.
    • Give your task a Name that will be easily remembered
    • Give your task a Description.
    • When set click Next.
  3. Choose how often you want the task to run.
    • For this example, choose Weekly and Pick 2 days (for the example I chose Mondays and Fridays).
    • When set click Next.
  4. Choose a Start time and a recurrence frequency. Then click Next.
  5. Choose Start a program, then click Next.
  6. Specify script/.bat/.cmd file you want to run. Click Browse and navigate to the folder where CMD/BAT file is saved and select it. Then click Next.
  7. If all is good; Click Finish.

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 7 of 9

Seychellian
Advocate
Advocate

What a pain in the butt. I just want to cancel back ups for rfa files and relocate my rvt file back ups to another folder. 

 

Seems like to do that I have to get a programming degree first though. 

0 Likes
Message 8 of 9

jc8000
Participant
Participant

Even when setting the backups limit to 3 I end up with 20 or more backups sometimes. Which I then have to manually delete.

 

Using Revit LT 2018.2.

 

Why is this still an issue.

0 Likes
Message 9 of 9

Brian_McL
Explorer
Explorer

This is, or at least was possible up thru the 2020 version.  I have been using this add-in:

BrianMcLaury_0-1654100328859.png

Among other things (none of which I ever used) this add-in allowed you to move the location of the .000# files.

BrianMcLaury_1-1654100419137.png

This developer is no longer providing updates to this add-in since the 2021 release.  I'm not sure how it was done, but it is possible.

 

 

0 Likes