I have a lot of dgn files and don’t know which are V7 and which are V8. Is there a way to quickly and easily tell them apart? I would hate to have to go through and open them up individually.
Do you know how to use PowerShell? I wrote a PowerShell function that will give a file's magic number (https://en.wikipedia.org/wiki/Magic_number_(programming)#In_files) and if it recognizes the magic number the file type. It can recognize V7 and V8 files.
The function is on GitHub here: Get-MagicNumber on GitHub
Put that function in a file, then open PowerShell and do:
. filename.ps1
where the first character is period, then space, then the name of the ps1 file you put the function in.
Once you've done that you can cd to your folder of files and do the following:
dir *.dgn -recurse -file | Get-MagicNumber | Format-Table File,FileType Where: -recurse means to get all *.dgn files in the current folder and sub-folders -file means only return info about files
You can also use the Export-Csv command instead of Format-Table to send the info to a CSV file instead of the screen.
As an alternative solution, you could just run a simple batch on all the files. Open, save (it should default to v8), done.
Connect r17 10.17.2.61 self-employed-Unpaid Beta tester for Bentley
To add to Bob's suggestions the following article details a possible workflow:
Upgrade V7 files to V8
John Doe said:I have a lot of dgn files and don’t know which are V7 and which are V8. Is there a way to quickly and easily tell them apart? I would hate to have to go through and open them up individually.
I cant use PowerShell for "reasons". I'll have to pursue other scripting means. The magic number information is helpful, thank you.
I have terabytes worth of files to go through and running a batch process will duplicate everything, this is undesirable. And as I understand, when running a batch convert process, all the converted files are saved into one directory. Which means I will lose all the directory path associations to the files, also undesirable. Unless there's a work around I don't think batch process will work for me.