Skip to main content

File and folder CLI name modifier on the all system

Project description

modfname

File and folder CLI 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.1.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modfname-1.1.5-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file modfname-1.1.5.tar.gz.

File metadata

  • Download URL: modfname-1.1.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for modfname-1.1.5.tar.gz
Algorithm Hash digest
SHA256 4d8cbbc19304bf52b50707031f28e59495ff894c175ea141f68bbc2f6f2b8ac2
MD5 565d7ee991f186c8e4c3cffc32af04fd
BLAKE2b-256 fbda9736b2d9b0ed8cec0878c4283cf070553f23241d8e56d52623003eda5982

See more details on using hashes here.

File details

Details for the file modfname-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: modfname-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for modfname-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2f822274f652613df393de1f47cc2267b619a12a04839c5b1a2bcbfed55ff3e2
MD5 2481df347d72a90202c38bea441b1929
BLAKE2b-256 5f7f8ea2cb6774c98f3a75ad3043a91cebdd6053f32a2916939f69553dfe3aff

See more details on using hashes here.

Supported by

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