• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

identify old releases files

  • Thread starter Thread starter Tarkus
  • Start date Start date

Tarkus

Guest
I have large folders with files made with various previous versions (in the same folders)
How can I do to identify files made or migrated with the release for example 2012 rather than 2013?:confused::confused:
 
from explorer , dx key, ipproperties, detail card
_foto__194.webpbut so, it works for the single file
 
already, a file at a time, I would like something that created me a list or something like that to be able to locate them quickly.. .
 
Are you interested in the version or only if it has to be migrated to the current rel.?
 
However yes, you can do a macro that opens all files in a folder, reads the data you need and writes them in a .txt file (I have an old stuff adaptable to the egg); But how did I write about what you need to know exactly?
 
I find only now the time to answer....
I would like to locate and select all files of this or that version to move them to folders related to the versions themselves.
this to create an archive of files not migrated and still openable with old versions of inventor
 
And I thought you were on vacation. :biggrin:
I did tests and I think it all works, but do a test as well on a copied folder or better after a nice backup, as always.
the program opens every inv file in the folder you will indicate and its subfolders: if the file must be migrated add it to the list (full name and version) and closes it without saving; It takes a little time. You can import the list to excel without problems.
Code:
' dei files che necessitano migrazione
public sub versionchecker()
    dim oapp as inventor.application
    set oapp = thisapplication
    
    
    dim filesystem as object
    set filesystem = createobject("scripting.filesystemobject")
    
    dim hostfolder as string
    
    ' -------------------------------------------------
    ' scrivere qui il percorso di ricerca desiderto
    ' -------------------------------------------------
    hostfolder = "c:\dovedevocercare\"
    
    dim slistname as string

    ' -------------------------------------------------
    ' scrivere qui il nome della lista, adesso la salva nel percorso radice
    ' -------------------------------------------------
    slistname = hostfolder & "list.txt"
    
    open slistname for output as #2
    write #2, "percorso", "versione"
    
    call dofolder(filesystem.getfolder(hostfolder), filesystem, oapp)
    
    set oapp = nothing
    close #2
    msgbox ("fatto")
end sub
' controlla tutte le cartelle ricorsivamente
sub dofolder(folder, ofs, oapp as inventor.application)
    dim subfolder
    dim myfile
    
    dim myfilename as string
    dim isinvfile as boolean
    dim odoc as document
    
    ' imposta l'apertura dei file ingnorando i collegamenti non risolti
    dim oopenwithoptions as namevaluemap
    set oopenwithoptions = oapp.transientobjects.createnamevaluemap
    call oopenwithoptions.add("skipallunresolvedfiles", true)
    
    for each myfile in folder.files
        ' verifica se il file ha un'estensione di inventor
        myfilename = myfile.path
        if strings.instr(strings.ucase(myfilename), ".iam") or _
           strings.instr(strings.ucase(myfilename), ".ipt") or _
           strings.instr(strings.ucase(myfilename), ".idw") or _
           strings.instr(strings.ucase(myfilename), ".ipn") then
            
            isinvfile = true
        else
            isinvfile = false
        end if
        
        ' apre solo i files inventor
        if isinvfile then
            set odoc = oapp.documents.openwithoptions(myfile.path, oopenwithoptions, false)
            
            ' aggiunge alla lista solo i files da migrare
            if odoc.needsmigrating then
                write #2, odoc.fullfilename, odoc.softwareversionsaved.displayversion
            end if
            
            odoc.close (true)
            set odoc = nothing
        end if
    
    next
    
    ' non controlla le cartelle oldversion
    for each subfolder in folder.subfolders
        if strings.instr(strings.ucase(subfolder.name), "oldversion") = 0 then
            dofolder ofs.getfolder(subfolder.path), ofs, oapp
        end if
    next
    
end sub
 
san catafratto da cad3d!!!!:4425::36_1_11:4425:
Thank you so much for your availability as soon as I can try it.
 
use it on a few folders at a time, it can be kept slow when opening tables and assemblies; I don't have time to optimize it quickly, next week maybe. .
 
but design assistant no longer exists?
I have a version of a few years ago and with design assistant know with which version all files of a folder are made
practically looks like an excel sheet, if there is already adding column "created with" (created with) and also tells you the release with sp of all files of any folder
 
exists, and I use it, but I have never noticed this function.
in the forums you never end up learning!
 
but design assistant no longer exists?
I have a version of a few years ago and with design assistant know with which version all files of a folder are made
practically looks like an excel sheet, if there is already adding column "created with" (created with) and also tells you the release with sp of all files of any folder
I also use the design assistant, but this function I do not know, and I did not understand where it is and how it is activated.
Can you explain better?
 
found the function.
But it tells me what version a file has been created and if this has to be migrated to the current version.
but don't tell me what version is currently migrated.
But it's already something
 
found the function.
But it tells me what version a file has been created and if this has to be migrated to the current version.
but don't tell me what version is currently migrated.
But it's already something
add another column: last update with
 
I give you two if you pull out of your magic hat a macro that only lets me locate the files of the versions I'm wearing.
e.g.: in this folder, list only the files of 2014 and 2016.
if you could do it directly on explore resources so you can select them and move them or delete....you get to 5 beers :36_1_13: :36_1_13:
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top