Yes, LinkFixer Advanced can be launched from the command line, or from a batch file, by executing the file: “C:\Program Files (x86)\LinkTek\LinkFixer Advanced\LFAcmd.exe”.

Executing this file without any command parameters displays the following help text:


Important: Do not run the Command Prompt as the administrator. This causes LinkFixer Advanced to be run as a local admin, which may not have read and write privileges to target file shares. 


Usage


LFAcmd.exe -t=<task> [-s=<settings file path>]


Parameters


t = Specifies the task to perform. Choose from one of the following:
Scan = Scans files into the database.
Inoculate = Inoculates files.
Cure = Cures broken links.
MoveRename = Moves/renames files and links.
ModifyLinks = Modifies links.
RegularReport = Creates a regular report.
CrossReferenceReport = Creates a cross reference report.
BrokenLinksReport = Creates a broken links report.
ClearDatabase = Clears the database.
ClearLog = Clears the log file.


f = Specifies a folder path to process. If this parameter is not provided, the folder selection specified in the settings file is used. Multiple folder paths can be specified.


r = Specifies a rename rules files to use when running either a Move/Rename or Modify Links task. 


o = Creates a temporary OneDrive network location using the specified URL.


sp = Creates a temporary SharePoint On-Premises network location using the specified URL. 


spo = Creates a temporary SharePoint Online network location using the specified URL. 


u = Specifies the username for the temporary network location. This option must be specified after the URL option.

Note: Only accounts that support basic Username and Password authentication can be used. SharePoint/OneDrive accounts that use Office 365 with or without MFA, SSO, or Federated Authentication, will not be able to use this option. 


p = Specifies the password for the temporary network location. This option must be specified after the URL option.

Note: Only accounts that support basic Username and Password authentication can be used. SharePoint/OneDrive accounts that use Office 365 with or without MFA, SSO, or Federated Authentication, will not be able to use this option.  


s = Specifies the settings file to use. If this parameter is not provided, the active settings file is used.


Examples


  • lfacmd.exe -t=Scan
    LinkFixer Advanced will only scan files under preselected folder(s), specified by selecting the folders from the UI. The default settings file is used.
     
  • lfacmd.exe -t=Scan -s=MyCustomSettings.xml
    LinkFixer Advanced will only scan preselected files under folder(s), specified by selecting the folders from the UI. A custom settings file is used.
     
  • lfacmd.exe -t=Inoculate
    LinkFixer Advanced will only Inoculate preselected files under folder(s), specified by selecting the folders from the UI. The default settings file is used.
     
  • lfacmd.exe -t=Inoculate -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\Excel Sample Files"
    LinkFixer Advanced will Inoculate files under the specified folder path above. The default settings file is used.
     
  • lfacmd.exe -t=ModifyLinks -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\Excel Sample Files" -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\Word Sample Files" -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\PowerPoint Sample Files"
     
    LinkFixer Advanced will run Modify Links on files under the specified folder paths above. Each folder path is separated by a -f={folder path}.  The default settings file is used.
     
  • lfacmd.exe -t=ModifyLinks -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\Excel Sample Files" -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\Word Sample Files" -f="C:\Users\Public\Desktop\LinkFixer Advanced\Sample Files\PowerPoint Sample Files" -r="C:\LinkFixer\RenameRules.csv"
     
    LinkFixer Advanced will run Modify Links on files under the specified folder paths above. Each folder path is separated by a -f={folder path}. A Modify Links ruleset has been specified. The default settings file is used.

  • lfacmd.exe -t=Cure -spo="https://linktek.sharepoint.com/sites/testsite" -u=username@linktek.com -p=SPO_Pa$$word -f="https://linktek.sharepoint.com/sites/testsite/shared documents/folder1" -f=https://linktek.sharepoint.com/sites/testsite/shared documents/folder2" -s="C:\LinkTek\Settings File\LinkFixer User Setting.xml"
    LinkFixer Advanced will run Cure as a task. 
    It will add the temporary SharePoint Online location "https://linktek.sharepoint.com/sites/testsite."
    It will authenticate to the temporary SharePoint Online location with the specified username and password.
    The files in the two folder locations, are in the scope of Cure.
    A custom settings file is used.  


Command Line Parameters


Only two parameters are required to run LinkFixer Advanced from the command line. The parameter “-t” specifies the task to be performed, such as Scan, Move/Rename, etc. The parameter “-s” specifies the name of the startup file containing the settings to be used.


By default, settings files are saved in the “Settings” sub-directory of the “LinkFixer Advanced” folder on the common desktop. This default path is “C:\Users\Public\Desktop\LinkFixer Advanced\Settings”. LinkFixer Advanced assumes that settings files will be found at that location. When specifying the “-s” parameter in the command line, you only need to specify the full path to a settings file in the case where you have saved the settings file to a different location.


If no “-s” settings file parameter is specified, LinkFixer Advanced uses the settings contained in the default settings file (LinkFixer User Settings.xml).


The “-t” task parameter is required and must be used as shown above.


By default, settings files are saved in the “Settings” sub-directory of the “LinkFixer Advanced” folder on the common desktop. For operating systems other than Windows XP, this default path is “C:\Users\Public\Desktop\LinkFixer Advanced\Settings”. LinkFixer Advanced assumes that settings files will be found at that location. If you have saved your settings files to a different location, you will need to specify the full path to the settings file when specifying the “-s” parameter in the command line.


Note


When LinkFixer Advanced is invoked from the command line, it will not display any wizards screens, prompts or progress bars. However, it will display a text message showing the percentage of completion of the LinkFixer Advanced process that is being run, such as: “Inoculate started. Completed: 75%”.