Skip to main content

file and folder name modifier on the all system

Project description

modfname

File and folder name modifier on the all system.

Replace a string by another string in file/folder names such as spaces by underscores. This tool permits to perform massive and controlled file/folder name modifications over the all file system in an intuitive and pleasant way. The modfname process can be done recursively from a defined path or directly on specific paths.

installation

with pip:
sudo pip3 install modfname

with yay:
yay -a modfname

with yaourt:
yaourt -a modfname

compatibility

python >= 3

usage

modfname [-i] [-d] [-r] [-p]
          [--initial INITIAL_STRING_01 INITIAL_STRING_02 ...]
          [--destination DESTINATION_STRING]
          [--paths PATH_01 PATH_02 ...]
          [--recursive] [--end_param]
options:
         -h, --help        show this help message and exit
         -i, --initial, --init        initial strings INITIAL_STRING_01 INITIAL_STRING_02 ... to be replaced
         -d, --destination, --dest        destination string DESTINATION_STRING to replace any INITIAL_STRING_01 INITIAL_STRING_02 ...
         -r, --recursive, --rec        modify file/folder names recursively from a defined path given by --paths PATH
         -p, --paths        define the specific paths PATH_01 PATH_02 ... to apply the modification or the path to perform recursively the modification from
         -end_param, --end        precise the end of a parameter enumeration

examples

for help:

modfname -h
or
modfname --help

specific modification file/folder name from spaces to underscores on "Test folder" folder and "Test folder/the test" file:

modfname -i " " -d "_" -p "Test folder" "Test folder/the test"
or
modfname -initial " " -destination "_" --end_param "Test folder" "Test folder/the test"

recursive file/folder name modification from "é" to "e" from the "~/Téléchargements" folder:

modfname -i "é" -d "e" -p ~/Téléchargements
or
modfname -i "é" -d "e" --end ~/Téléchargements

suggestions

some useful bash aliases with modfname:

# spaces to underscores modification on file/folder name for the specified paths
alias modfnamespacesto_='modfname -i " " -d "_" -p'
# spaces to underscores modification on file/folder name in the local folder path
alias modfnamespacesto_local='modfname -i " " -d "_" -l -p'
# spaces to underscores modification on file/folder name recursively from the precise folder path
alias modfnamespacesto_recursive='modfname -i " " -d "_" -r -p'

# to lowercase on file/folder name for the specified paths
alias modfnamelower='modfname --lowercase -p'
# to lowercase on file/folder name in the local folder path
alias modfnamelowerlocal='modfname --lowercase -l -p'
# to lowercase on file/folder name recursively from the precise
alias modfnamelowerrecursive='modfname --lowercase -r -p'

# to uppercase on file/folder name for the specified paths
alias modfnameupper='modfname --uppercase -p'
# to uppercase on file/folder name in the local folder path
alias modfnameupperlocal='modfname --uppercase -l -p'
# to uppercase on file/folder name recursively from the precise
alias modfnameupperrecursive='modfname --uppercase -r -p'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modfname-1.0.3.tar.gz (6.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page