This procedure describes how to extract each object to a separate file using the UC4 File Explorer.
To extract each object to a separate file:
The Search window appears.
A list of search results appears.
The Save dialog box appears.
:SET &HOST# = "<name of Host>"
:SET &CSV_FILE# = "<name of the file and full directory of the exported objects to csv>"
:SET &EXPORT_PATH# = "<name of the target path directory>"
:SET &HND#=PREP_PROCESS_FILE(&HOST#,&CSV_FILE#,,"COL=DELIMITER",'DELIMITER=";"')
:PROCESS &HND#
: SET &Line#=GET_PROCESS_LINE(&HND#,1)
: PRINT "<&Line#>"
: SET &OBJECT# = &Line#
: SET &File# = "&EXPORT_PATH#&line#.xml"
: SET &Ret# = EXPORT (&Object#, &File#)
:ENDPROCESS
For an example of the script, see Exporting each file to a separate file running the script example.
Parent Topic |