ReplaceMagic Start - CommandLine parameters
After ReplaceMagic installation you will have ReplaceMagic icons in Programs group and/or on desktop.
By clicking on icon on the desktop ReplaceMagic will start and you will see splash screen:
ReplaceMagic can be started also with command line parameters to enable processing without direct user input. This feature is useful if you want to schedule document processing or you need to start ReplaceMagic from your own tools.
Syntax is: /config=NAME_OF_CONFIG_FILE (for example, ReplaceMagic.Total /config=CommandLineParameters.xml).
Configuration file format is:
<SCANFOLDERS><SCANFOLDER></SCANFOLDER></SCANFOLDERS>= folder where ReplaceMagic has to do Scan and then Search&Replace => for example, d:\_work\_TestFolders
<INCLUDESUBFOLDERS></INCLUDESUBFOLDERS>=False/True (set if ReplaceMagic should scan or make changes in subfolders)
<DOCEXTENSIONS><DOCEXTENSION></DOCEXTENSION></DOCEXTENSIONS> =.pdf,.one,.lnk,.doc,.dot,.docx,.dotx,.docm,.dotm,.xls,.xlt,.xlw,.xla,.xlsx,.xlsm,.xlsb,.xltx,.xltm,.ppt,.pps,.pot,.pptx,.pptm,.potx,.potm,.ppsx,.ppsm,.vdx,.vsdx,.vssx,.vstx,.mpp,.mpt,...
Format of document extensions to be processed is .EXT1,.EXT2. Separator between extensions is ,
<DOCSECTIONS><DOCSECTION></DOCSECTION></DOCSECTIONS>=>1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44
Below you can see what is what. Separator is ;
<SEARCHREPLACE><KEYPAIR><SEARCH></SEARCH><REPLACE></REPLACE></KEYPAIR></SEARCHREPLACE> - Combination of search&replace strings
<CREATEBACKUP></CREATEBACKUP>=True (if you want to create backup of processed documents set true otherwise set false)
<BACKUPEXTENSION></BACKUPEXTENSION>=.bck (here you have possibility to define extension of documents that will have backup)
<BACKUPONLYCHANGED></BACKUPONLYCHANGED>=false (set to true so that only changed documents get backup, otherwise with setting to false all documents will get backup)
<BACKUPLOCATION></BACKUPLOCATION> - location where backup files should be saved
<WHOLEWORD></WHOLEWORD>=False (true/false to set if only Whole Words will be processed)
<MATCHCASE></MATCHCASE>=False (true/false to set should ReplaceMagic use MatchCase to process strings)
<WILDCARDS></WILDCARDS>=False (true/false to set will WildCards be used)
<REGEX></REGEX>=False (true/false to set will regular expression be used)
<REGEXPATTERN></REGEXPATTERN>=xxxx (use this line to specify regular expression pattern)
<HYPERLINKSONLY></HYPERLINKSONLY>=True/False => used to specify that ReplaceMagic should change only address part of the hyperlinks. In case of true TextToDisplay will be skipped
<LINKTYPE></LINKTYPE>=1/2/3 => if you set [HYPERLINKSONLY]=True you can specify also which type of hyperlinks should be processed. 1 => all link types, 2 => only file links and 3 => only hyperlinks (http, https, mail, ftp). If [HYPERLINKSONLY] is set to false this parameter will be skipped.
<SKIPEMPTYHYPERLINKS></SKIPEMPTYHYPERLINKS> = False/True -> in case of true ReplaceMagic will skip all hyperlinks where address is empty in Word documents.
<SKIPOFFLINEDOCUMENTS></SKIPOFFLINEDOCUMENTS> = False/True -> by setting this to TRUE ReplaceMagic will skip documents that are marked as offline documents.
<CONTINUEREPLACEMENTS></CONTINUEREPLACEMENTS> = False/True -> by setting this to true ReplaceMagic will continue with found strings processing after first replacement is done. In case of FALSE after first replacement is done ReplaceMagic will stop further changes.
<ULTRAFASTSCAN></ULTRAFASTSCAN> = False/True -> In case that you want to go straight to replacement process set this parameter to TRUE. In that case ReplaceMagic will only create list of found documents without additional information about document content (link number of hyperlinks and what they are). This will accelerate processing if you do not need record of what was before replacements are not done.
<CONVERTBACKSLASH>True or False</CONVERTBACKSLASH>
<CONVERTSLASH>True or False</CONVERTSLASH>
Those two parameters are connected meaning that if one is true other can be only false.
<SHAREPOINTPROCESSING></SHAREPOINTPROCESSING>= True/False (used to define if ReplaceMagic will try to connect to provided SharePoint URL). If value is set to False ReplaceMagic will use standard access to files on hard disks, network shares or similar
<SHAREPOINTURL></SHAREPOINTURL>= URL of SharePoint location to be processed
<SHAREPOINTUSERNAME></SHAREPOINTUSERNAME>= SharePoint user username
<SHAREPOINTPASSWORD></SHAREPOINTPASSWORD>= SharePoint user password
<SHAREPOINTCONNECTIONTYPE></SHAREPOINTCONNECTIONTYPE>= SharePoint connection type (SharePoint.Online=1, Windows Authentication (NTML or Kerberos)=0, Anonymous=2, Forms Based=3, Claims (ADFS)=4, ADFS SSO=5)
<CLAIMSDOMAIN></CLAIMSDOMAIN>=domain (for example, replacemagic.com)
<CLAIMSSTS></CLAIMSSTS>=STS (for example, adfs.replacemagic.com)
<CLAIMSIDPLD></CLAIMSIDPLD>=IDPLD (for example, urn:sharepoint:sp-replacemagic)
<SHAREPOINTLOCATIONS>
<SHAREPOINTLOCATION>
<DOCUMENTLIBRARY></DOCUMENTLIBRARY>
<ISDOCLIB></ISDOCLIB>
<ISFOLDER></ISFOLDER>
<ISROOTSITE></ISROOTSITE>
<ISSITE></ISSITE>
<ROOT></ROOT>
<SELECTEDFOLDER></SELECTEDFOLDER>
<SELECTEDNODEURL></SELECTEDNODEURL>
<SERVERRELATIVEURL></SERVERRELATIVEURL>
<SITE></SITE>
</SHAREPOINTLOCATION>
</SHAREPOINTLOCATIONS>
<PROTECTSTRINGS>True or False</PROTECTSTRINGS> this parameter is used to encrypt/decrypt SharePoint logon data
<SAVERESULTS>True or False</SAVERESULTS> with this parameter set to true ReplaceMagic will create export of processing results
<RESULTSONEMAIL>True or False</RESULTSONEMAIL> in case that parameter is set to true ReplaceMagic will send result on email that is configuration over Configuration => Notifications
<EXCLUDEFILESFOLDERS>0, 1 or 2</EXCLUDEFILESFOLDERS>
Where to apply filter:
- 0 - only folders
- 1- only files
- 2- folders and files
<EXCLUDEFILESFOLDERSSTRINGS>
<EXCLUDEFILESFOLDERSSTRING></EXCLUDEFILESFOLDERSSTRING>
</EXCLUDEFILESFOLDERSSTRINGS>
This section is used to set check which folders , files or folders and files should be skipped based on provided strings (part of <EXCLUDEFILESFOLDERSSTRING></EXCLUDEFILESFOLDERSSTRING>)
DocSections are:
OfficeHyperlinks = 1
OfficeLinkSources = 2
OfficeTables = 3
OfficeOLEObjects = 4
OfficeText = 5
OfficeHeader = 6
OfficeFooter = 7
OfficeComment = 8
OfficeFieldCodes = 9
OfficeFootnote = 10
OfficeBookmark = 11
OfficeNote = 12
OfficeVBA = 13
OfficeDocumentProperties = 14
OfficeFormulas = 15
OfficePowerQuery = 49
LNKHotkey = 16
LNKDescription = 17
LNKArguments = 18
LNKTargetPath = 19
LNKWorkingDirectory = 20
LNKIconLocation = 21
PDFAnnotations = 22
PDFBookmarks = 23
PDFHeaderFooter = 24
PDFLinks = 25
PDFText = 26
PDFDocumentProperties = 27
PDFLaunchAction = 28
'DocumentProperties
Author = 29
Title = 30
Template = 31
Subject = 32
Keywords = 33
Description = 34
LastAuthor = 35
Comments = 36
Company = 37
Manager = 38
LastSavedBy = 39
Category = 40
Creator = 41
CustomDocumentProperties = 42
'Custom Document Types
Text = 43
SharePoint page content = 44
DocumentTemplate = 45
SharePointListItems = 47
Email = 50
P.S. when you install ReplaceMagic example file will be part of installation (CommandLineParameters.xml)