rrthomas / mmv

Other
50 stars 7 forks source link

Add ability to rename "/" containing source files #12

Closed AzimMuradov closed 1 year ago

AzimMuradov commented 1 year ago

Firstly, thanks for the program. It helps me a lot in my daily life.

Unfortunately, I found a rather annoying bug:

I couldn't find a way to rename files containing "/". The program must have thought it was a path separator.

For example:

$ ls
>>> foo/bar.txt
$ mmv "*/*" "#1-#2"
>>> */* -> #1-#2 : no match.
>>> Nothing done.

There are should be an option to ignore "/".

rrthomas commented 1 year ago

Unfortunately this is not possible. POSIX forbids slash in filenames. On macOS, a colon in a filename is represented to the user as a slash, for compatibility with MacOS Classic; you should be able to use colons to represent slashes there (I haven't tested it). On Windows, again, slashes are not allowed in filenames.

So, most likely your filename does not contain a slash in the first place.

AzimMuradov commented 1 year ago

You are absolutely right!

Turns out there is a bug in yt-dlp, it's somehow created a file with slashes. 🤷‍♂‍

Thanks for help!