Automatically Create Backup Files When Opening


 Product:MicroStation
 Version:CONNECT
 Environment:Windows 10
 Area:Archive/Backup
 Subarea:N/A

Problem

I would like a way to create a backup copy of my design file automatically every time I open it.

Solution

This would be a great solution to protect very important design files when performing edits.

1. Open a blank text file with Notepad or any other text editor and type the word backup. Save the text file.
2. Place the text file in the desired location for safekeeping. Ideally this would be placed within your project directories
3. Open any design file with MicroStation. Navigate to File>Settings>User>Preferences>Operation Category
4. Enable the Execute Startup Script option as shown

5. Press OK and go back to the main MicroStation interface and Save Settings (CTRL+f)
6. Fully close out of MicroStation
7. In Windows File Explorer, navigate to pathway C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MicroStation CONNECT Edition\MicroStation CONNECT Edition
8. Copy the MicroStation CONNECT Edition shortcut and paste it in the same directory (you may need extra permissions from your admin to do this). 
9. Rename this shortcut as desired. For example "MicroStation CONNECT Edition - Master DGN Backup"



10. Right click the newly created shortcut and select Properties
11. Add syntax to the end of the Target field per the Help documentation.

Example:

microstation.exe -s"Startup File Path" "DGN file path"

e.g. microstation.exe -s"D:\TFS\1115780\cmdFile.txt" "D:\TFS\1115780\newtest.dgn"

In my case, the end result of my target field reads as follows:
"C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe" -s"D:\temp\Backup.txt" "D:\temp\master.dgn" 

12. Click Apply, then OK. Move the newly created shortcut to your Desktop for easier access.
13. Run the created shortcut, and when MicroStation opens up, observe a backup file (.bak) has been created in the directory defined by MS_BACKUP config variable. The Message Center will remind you that this process has been performed. This .bak file can be retrieved later and renamed back to .dgn format for use if needed.

***NOTE: This method can be used with specific files or with any file as long as a new session of MicroStation is used. If using File>Open within MicroStation, then this will not work.***

See Also

Preferences Dialog, Operation Category

Automatic Back-Up and Save Settings

How to set configuration variable MS_BACKUP to create a backup file in same directory as active file

MS_BACKUP defaults now to the out directory

Other language sources

 Original Author:Jayson Perry