3 ms·
The non-alphanumeric characters are just asking for trouble. Agents will fail to escape them correctly, and the $ could expand a variable. Base62 (or 64, with
by bensyverson 21d ago
The non-alphanumeric characters are just asking for trouble. Agents will fail to escape them correctly, and the $ could expand a variable.
Base62 (or 64, with -_) is totally sufficient.
- TacticalCoder 21d ago> Base62 (or 64, with -_) is totally suffic Base64 all the way, but with dot and underscore. Dash is problematic (or, well, let's say you're bound to end up on a script not correctly dealing with those: you definitely can deal correctly with dashes and spacing chars in filenames, but you're guaranteed to encounter a SNAFU at some point when a script you didn't write shall invariably fuxx0rs everything up). Dot is accepted and common in filenames anyway. I've got a scheme where I added checksums to my files (in the filename) using dashes but switching to underscore is on my TODO list. Basically I'll change this: dsc0974987-b3-0a772982c1.jpg to: dsc0974987_b3_0a772982c1.jpg (YMMV as to whether adding the first x bits of whatever checksum you fancy on files you know aren't going to change works or doesn't work for you: it works for me and it's part of a suite of tools I made for myself for file integrity / backuping purpose / classification / etc.)