Skip to main content

RECURSIVELY REMOVE INVALID CHARS IN PATHS

A simple script to find and remove invalid characters in file and directory names. Inspired by the need to workaround limitations of Egnyte's unsupported character types.

The chars are currently hardcoded into the script, but like the list of servers to run on, this should really be added to a config/lst file.

The aforementioned list should reside in $HOME/.ELC.lst. The format is one line per server and lines beginning with # will be ignored.

There is a really convoluted bash version and a nice simple Python version and a W.I.P Powershell version...

run.sh is a bash wrapper script for mounting a list of servers to run the python script on.

INSTALLATION

pip install rmchars

CLI USAGE

usage: rmchars [-h] (-i | -a | -t | -q | -f) [path]

Remove invalid characters from a given path.

positional arguments:
  path               a valid path

optional arguments:
  -h, --help         show this help message and exit
  -i, --interactive  prompt before renaming each path
  -a, --automate     rename each path without prompting
  -t, --dry_run      preform a dry run to see what would be renamed
  -q, --quiet        run silently
  -f, --find         print a list of invalid paths

TODO

  • Add support for unicode and control characters
  • Add char list to config file
  • Finish Powershell version

Metadata

Release files for rmchars 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rmchars 0.0.5
File Size Uploaded
rmchars-0.0.5.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rmchars 0.0.5
File Interpreter ABI Platform
rmchars-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / rmchars-0.0.5.tar.gz

Download URL rmchars-0.0.5.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ad0fa7b7156dc1ca64418291ba3743e6bb56ece13e2a8427a1bebda3747d497d
BLAKE2b-256 checksum
How to use checksums
426de36a27e289212a32239778a22810b88bd7011f260ef97b1bef982c2ce67b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / rmchars-0.0.5-py3-none-any.whl

Download URL rmchars-0.0.5-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dab0543f7c1fc27b302e4e689ef27c8f82dd24b8ac36c30db30c7229dc668df7
BLAKE2b-256 checksum
How to use checksums
ce8aecec1a0caac384178b4b830acdfac206592aadf7ae1ec465fd2a5590a667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page