• What Is Your Fave File Detox?

    From Farley Flud@21:1/5 to All on Tue Apr 29 19:25:29 2025
    XPost: comp.os.linux.misc

    The users of GNU/Linux are in the minority but still have to deal
    with the outrageous file naming practices of the Microslop/Apphole
    majority.

    What programs or scripts do you use to deal with this foreign
    naming mess?

    One example is "detox:"

    https://github.com/dharple/detox


    I always use the surprisingly still existent Perl script "sanity:"

    https://github.com/splitbrain/sanity/tree/master


    Are there any others?



    --
    Systemd: solving all the problems that you never knew you had.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Woozy Song@21:1/5 to Farley Flud on Wed Apr 30 09:48:14 2025
    Farley Flud wrote:
    The users of GNU/Linux are in the minority but still have to deal
    with the outrageous file naming practices of the Microslop/Apphole
    majority.

    What programs or scripts do you use to deal with this foreign
    naming mess?

    One example is "detox:"

    https://github.com/dharple/detox


    I always use the surprisingly still existent Perl script "sanity:"

    https://github.com/splitbrain/sanity/tree/master


    Are there any others?




    Generally, I want to only remove spaces, but keep foreign letters (from German/Icelandic whatever). What annoys me is that rename command works differently in Debian to other distros.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to All on Wed Apr 30 01:52:49 2025
    On Wed, 30 Apr 2025 09:48:14 +0800, Woozy Song <[email protected]>
    wrote in <vurvh2$34dtj$[email protected]>:

    Farley Flud wrote:
    The users of GNU/Linux are in the minority but still have to deal
    with the outrageous file naming practices of the Microslop/Apphole
    majority.

    What programs or scripts do you use to deal with this foreign
    naming mess?

    One example is "detox:"

    https://github.com/dharple/detox


    I always use the surprisingly still existent Perl script "sanity:"

    https://github.com/splitbrain/sanity/tree/master


    Are there any others?




    Generally, I want to only remove spaces, but keep foreign letters (from German/Icelandic whatever). What annoys me is that rename command works differently in Debian to other distros.

    $ cat despace.pl
    #!/usr/bin/perl

    $|=1;

    while($fn = shift)
    {
    if(! -e $fn)
    {
    warn("$fn:$!\n");
    next;
    }

    $nfn = $fn;
    $nfn =~ s# #_#g;

    if( -e $nfn) { warn("$nfn:file exists\n"); next; }

    print("$fn -> $nfn ...");
    rename($fn,$nfn) || warn("while renaming $fn to $nfn:$!\n");

    print "\n";

    }


    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.14.4 Release: Mint 22.1 Mem: 258G
    "My inferiority complexes aren't as good as yours."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Borax Man@21:1/5 to Farley Flud on Wed Apr 30 10:05:19 2025
    On 2025-04-29, Farley Flud <[email protected]> wrote:
    The users of GNU/Linux are in the minority but still have to deal
    with the outrageous file naming practices of the Microslop/Apphole
    majority.

    What programs or scripts do you use to deal with this foreign
    naming mess?

    One example is "detox:"

    https://github.com/dharple/detox


    I always use the surprisingly still existent Perl script "sanity:"

    https://github.com/splitbrain/sanity/tree/master


    Are there any others?


    I didn't know of detox, nor use any such tool anytime I needed to, I did
    it manually, or used rename or prename. Good to know this is available
    in the repos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to [email protected] on Thu May 1 09:13:52 2025
    On Thu, 1 May 2025 08:24:19 -0000 (UTC), Lawrence D'Oliveiro
    <[email protected]d> wrote in <vuvb3j$28v7l$[email protected]>:

    On Wed, 30 Apr 2025 09:48:14 +0800, Woozy Song wrote:

    Generally, I want to only remove spaces, but keep foreign letters (from
    German/Icelandic whatever).

    I take full advantage of the fact that *nix systems allow filenames that
    are not legal on Dimdows.

    What annoys me is that rename command works differently in Debian to
    other distros.

    What rename command?

    There's one that comes with perl.

    I prefer "mmv" for mass renaming:

    MMV(1) User Commands MMV(1)

    NAME
    mmv - move/copy/link multiple files by wildcard patterns

    SYNOPSIS
    mmv [-m|-x|-r|-c|-o|-a|-l|-s] [-h] [-d|-p] [-g|-t]
    [-v|-n] FROM TO

    DESCRIPTION
    move/copy/link multiple files by wildcard patterns

    The FROM pattern is a shell glob pattern, in which `*'
    stands for any number of characters and `?' stands for a
    single character.

    Use #[l|u]N in the TO pattern to get the string matched
    by the Nth FROM pattern wildcard [lowercased|upper‐
    cased].

    Patterns should be quoted on the command line.
    [...]

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.14.4 Release: Mint 22.1 Mem: 258G
    "A cat is an animal who never cries over spilled milk."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Woozy Song on Thu May 1 08:24:19 2025
    On Wed, 30 Apr 2025 09:48:14 +0800, Woozy Song wrote:

    Generally, I want to only remove spaces, but keep foreign letters (from German/Icelandic whatever).

    I take full advantage of the fact that *nix systems allow filenames that
    are not legal on Dimdows.

    What annoys me is that rename command works differently in Debian to
    other distros.

    What rename command?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to All on Thu May 1 10:49:27 2025
    On Thu, 01 May 2025 10:23:40 +0000, Farley Flud <[email protected]>
    wrote in <183b602b79d4754c$100112$5317$[email protected]>:

    On Thu, 01 May 2025 09:13:52 +0000, vallor wrote:


    What rename command?

    There's one that comes with perl.

    I prefer "mmv" for mass renaming:


    Those shell commands may not work.

    Example. Some videos downloaded from YouTube will have outlandish
    filenames that contain exclamation points (!) inside double quote marks: '..."...!..."...'
    This is not a joke.

    When bash sees that it will choke.

    Not if you set +H

    _[/home/vallor]_(vallor@lm)🐧_
    $ !!
    !!: command not found

    It's best to use the renaming utilities that I cited.

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.14.4 Release: Mint 22.1 Mem: 258G
    "Ethernet n.: something used to catch the etherbunny."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farley Flud@21:1/5 to vallor on Thu May 1 10:23:40 2025
    On Thu, 01 May 2025 09:13:52 +0000, vallor wrote:


    What rename command?

    There's one that comes with perl.

    I prefer "mmv" for mass renaming:


    Those shell commands may not work.

    Example. Some videos downloaded from YouTube will have outlandish filenames that contain exclamation points (!) inside double quote marks: '..."...!..."...'
    This is not a joke.

    When bash sees that it will choke.

    It's best to use the renaming utilities that I cited.



    --
    Hail Linux! Hail FOSS! Hail Stallman!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)