I need to relocate a number of files from one volume to another. The files that need to be moved aren't based on size or date. They are references from datasets in a particular BOM.
Wondering if anyone has done this and can recommend the best way to go about it.
Thanks, in advance, for any suggestions.
That certainly seems a good way to move the files. From the docs, however, it seems that it requires criteria based on age and size.
Alternatively, it can accept a file with a list of filenames. That appears to be list of "named references", files in the source volume. Do you know of a way that I can generate such a list? Possibly with a query or a report? I need to relocate all of the files referenced by a particular BOM.
Again, any suggestions are appreciated.
Good afternoon, I think you can try to solve this problem using the preference IMF_display_full_path and the utility move_volume_files, as written by @MarkusK
1) Get the list of files:
move_volume_files -u=user -p=password -g=group -f=list -outputfile=c:\list.txt -srcvol=volume1 -destvol=volume2
2) Use the preference IMF_display_full_path to get the necessary file names. Мore detail about this preference you can read in this thread:
3) Edit the list.txt file. Leave in it only the necessary file names.
4) Move the files:
move_volume_files -u=user -p=password -g=group -f=move -presorted_file=C:\list.txt -srcvol=volume1 -destvol=volume2
I understand what you are saying. There are, however, more than 50,000 files in the volume and I only need to move 2.000 of them. I'm trying to learn how to generate a list of those 2,000 files.
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4
Depending on your exact use case you might be able to get away with plmxml or tcxml export to get the file list (or at least get enough information to filter the list from move_volume_files).
If you perform a plmxml export of your structure using the out of the box ConfiguredDataExportDefault then you will get the Dataset(s) and the associated files (as ExternalFile elements). By default the property set doesn't contain enough information for the files. You would need to create a new Transfer Mode, use the existing Closure Rule, and add a Property Set that adds ImanFile sd_path_name, and file_name properties.
You should then be able to use the information in the PLMXML to filter the list from move_volume_files.
Still a bit of work, but no ITK.
This would give you the names of the files associated with the datasets that are in the configured version of the structure. I think it would also give you the files that are configured in-context attachments (for example DirectModel JT files representing deformed parts in an NX assembly).
If you want the files from the datasets for all revisions of the parts involved in the assembly then you should still be able to do this, but you will need to modify the closure rule to go from ItemRevision up to Item, then back to all the ItemRevisions. Getting the in-context attachments that cover all revisions of all the parts would be more complex.
You may need to use tcxml instead of plmxml as this can process its way through the MEAppearancePathRoot and MEAppearancePathNodes to find the attachments.
As @RandyEllsworth says there isn't necessarily an easy solution, particularly if you have in-context attachments you need to move, but depending on your use case you may be able to get a long way with the export tools before you need to reach for the compiler.