|26-05-2023||Jos van Heesen||created||1.0|
|05-jun-2923||C.W.||minor clarifications and text clean-up||1.1|
Purpose of this technical note
When collecting data in a number of (SigVM) files, sometimes after collection it may become clear that not all settings are optimal. Although editing the files one by one is possible with Review, it is sometimes simpler to edit just one file and propagate the settings to the other files.
Batch update of configuration files
To batch update the configuration of all SigVM files in a directory use the following steps:
- Put the scrip text (see below) in a text file and name it update.bat (note: in the for-loops, %%i will be filled in with complete filenames, including the extension. The %%~ni will be filled in with the filename without the extension)
- If needed, download 7zip from https://www.7-zip.org/ and install it on your computer.
- Make backup copies of your SigVM files first.
- Then take one .SigVM file and use VM Review to adjust the configuration parameters to how you want them (and save it).
- Extract the xml file from that .SigVM file (using 7-zip) and rename the extracted xml file to config.xml.
- Put that config.xml file in the directory with the .SigVM files you want to update
- Also put the update.bat file in that directory
The script will remove the existing xml files from the .SigVM files and replace them with config.xml (renamed to the original xml filename).
- Open a command prompt and go to the directory with the files to change.
- Execute the command “update”
rem create copies of the xml file
for %%i in (*.sigvm ) do copy config.xml %%~ni.xml
rem delete original xml files
for %%i in (*.sigvm ) do "c:\Program Files\7-Zip\7z.exe" d -y *.xml
rem add the new xml files
for %%i in (*.sigvm ) do "c:\Program Files\7-Zip\7z.exe" a -y %%i %%~ni.xml
for %%i in (*.sigvm ) do del %%~ni.xml