Array
(
    [0] => Warning
    [1] => Undefined array key "language"
    [2] => /home/whmcsdev/public_repo/wbteampro.major-release/installation/modules/addons/wbteampro/initialize.php
    [3] => 282
)
Array
(
    [0] => Warning
    [1] => Undefined property: stdClass::$state
    [2] => /home/whmcsdev/public_repo/wbavatax.master/installation/modules/addons/wbavatax/hooks.php
    [3] => 942
)
Array
(
    [0] => Deprecated
    [1] => htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
    [2] => /home/whmcsdev/public_repo/wbavatax.master/installation/modules/addons/wbavatax/hooks.php
    [3] => 279
)
Mass File Renaming - Knowledgebase - WHMCS Dev
Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

Mass File Renaming Print

  • 3

This little snippet will help you to rename a list of files with a .xhtml extension to a .html extension.

for i in *.xhtml; do mv $i $(echo $i | sed -e 's/.xhtml/.html/'); done

The script is run from the folder containing the list.
The for .. do loop assums the file list from the current folder.
This will not work recursively / act upon contents of child folders.
Each element from the loop is moved from $i (current name) to sed -e s/find/replace/'.
sed can be replaced with any logic for adjusting the value of $i.

Was this answer helpful?

« Back

Powered by WHMCompleteSolution