I have about 30k image files on my pc in 1 dir C:\TEMP1\ for example. These files all have to be renamed to a specific unique name. Aside from these files I also have an xml file that contains properties for these files, document title, document id for example. The xml file also contains the path and file name of the image files. I need a script that can read the xml file, find the tag <ExternalRef> and then go out to C:\TEMP1\ and rename that file according to other xml tags such as document title and document id. I have 1 xml file for all 30k images. I dont have any scripting experience and was looking for some help.
This is what the xml file looks like: So I need to find <ExternalRef>file://C:\TEMP1\000E57BC.TIF</ExternalRef> and rename that file to <DocumentTitle>Probate Order-SO</DocumentTitle> _<ABC_DocumentID>APO24L977</ABC_DocumentID>...etc
- <ABC_TitleDocument>
- <ABC_TitleDocumentProperties>
<ObjectType>1</ObjectType>
<Creator>Administrator</Creator>
<DateCreated>2013-10-07T16:45:27.237Z</DateCreated>
<LastModifier>Administrator</LastModifier>
<DateLastModified>2013-10-07T16:45:27.237Z</DateLastModified>
<Id>6132c424-007b-4ef9-9c07-2b8171b83357</Id>
<Name>Probate Order-SO</Name>
<SecurityPolicy />
<SecurityParent />
<IsFrozenVersion>0</IsFrozenVersion>
- <VersionSeries>
- <ObjectRef>
<ObjectId>1be7c26c-89d2-40bf-afeb-a081714e470a7</ObjectId>
<ClassId>01a3a8c8-7aec-11d1-a31b-a0020af9fbb1c</ClassId>
</ObjectRef>
</VersionSeries>
<MajorVersionNumber>1</MajorVersionNumber>
<MinorVersionNumber>0</MinorVersionNumber>
<VersionStatus>1</VersionStatus>
- <ContentElements>
- <ContentTransfer>
<ObjectType>1038</ObjectType>
<ContentType>image/tiff</ContentType>
<RetrievalName>000E57ABC.TIF</RetrievalName>
<ExternalRef>file://C:\TEMP1\000E57BC.TIF</ExternalRef>
</ContentTransfer>
</ContentElements>
<MimeType>image/tiff</MimeType>
<DocumentLifecyclePolicy />
<DocumentTitle>Probate Order-SO</DocumentTitle>
<SourceDocument />
<OwnerDocument />
<PublicationInfo />
<IgnoreRedirect />
<EntryTemplateObjectStoreName />
<EntryTemplateLaunchedWorkflowNumber />
<EntryTemplateId />
<ABC_Area>P</ABC_Area>
<ABC_DocumentCategory>Title</ABC_DocumentCategory>
<ABC_DocumentClass>11</ABC_DocumentClass>
<ABC_DocumentID>APO24L977</ABC_DocumentID>
<ABC_LandArea>151</ABC_LandArea>
<ABC_ScanDate>2013-10-07T05:00:00Z</ABC_ScanDate>
<ABC_ScanOperator>Administrator</ABC_ScanOperator>
<ABC_ScanWorkstationID>SCN04:Sess 3</ABC_ScanWorkstationID>
<ABC_Agency>03</ABC_Agency>
<ABC_DocumentType>ABC</ABC_DocumentType>
<ABC_LTRO>P</ABC_LTRO>
<ABC_KofaxID>{DA701CAD-5CB2-444e-9ABBB-47CF0B2FD801}</ABC_KofaxID>
<ABC_DocumentCount>11</ABC_DocumentCount>
<ABC_Recordable>1</ABC_Recordable>
<ABC_BatchType>FOLLOW-UP</ABC_BatchType>
<ABC_EStamped>0</ABC_EStamped>
<ABC_RecordationState>PENDING</ABC_RecordationState>
<ABC_FileName />
<ABC_FolderName />
<ABC_BatchName>10/7/2013 8:25:26 AM</ABC_BatchName>
<ABC_RecordDate>11/19/2004</ABC_RecordDate>
<ABC_DocumentDate>1977-03-30T05:00:00Z</ABC_DocumentDate>
<ABC_ConveyanceType>SO</ABC_ConveyanceType>
</ABC_TitleDocumentProperties>
</ABC_TitleDocument>