How can we delete everything in the DataMiner/Protocols directory without deleting the Icons.xml file?
How can we also delete all files and subdirectories from the protocols directory without deleting the Icons.xml?
We have a DataMiner upgrade package (.dmapp) that has the following content:
FilesToDelete.txt:
c:\skyline dataminer\Views.xml
c:\skyline dataminer\Spectrum.xml
c:\skyline dataminer\SpectrumMonitors.xml
c:\skyline dataminer\AdminScripts
c:\Skyline dataminer\Aggregation
c:\Skyline dataminer\AssetManager
c:\skyline dataminer\Correlation
c:\skyline dataminer\Documents
c:\skyline dataminer\Elements
c:\skyline dataminer\Filters
c:\skyline dataminer\Mobile Gateway
c:\skyline dataminer\Protocols\*.*
c:\skyline dataminer\Recycle Bin
c:\skyline dataminer\Redundancy
c:\skyline dataminer\RemoteServices
c:\skyline dataminer\Scripts
c:\skyline dataminer\Services
c:\skyline dataminer\Simulations
c:\skyline dataminer\SLAlerter
c:\skyline dataminer\Spectrum Alarm Recordings
c:\skyline dataminer\System Cache
FilesToLeave.txt:
c:\skyline dataminer\protocols\icons.xml
UpdateContent.txt:
Lock
Disable
Kill
IIS Stop
Delete
Enable
Unlock
IIS Start
Start
Hi Brecht,
Unfortunately, FilesToLeave only works in conjunction with the Update command, as a way to prevent files being overwritten when they already existed previously.
As far as I can see, FilesToLeave does not work as an exclusion list for the Delete command.
Some ideas for your scenario (deleting all protocol files except icons.xml):
- Have multiple entries in FilesToDelete (Protocols\*\protocol.xml*, Protocols\*.txf, Protocols\*\trending*.xml, Protocols\*\template*.xml...
- Use a batch file to temporary copy the icons.xml somewhere else and put it back after the delete. The batch file can be e.g. dropped using an "Update Tools" command
- If icons.xml is a static file: delete all from protocols.xml and then use an "Update Protocols" command to write icons.xml