How to rename multiple *file extensions* to *nil/no file extension* at once in Windows? - eviltoast

In case of renaming multiple file extensions to another, they suggested to type this command in cmd promt or powershell: ren *.(current extension name) *.(new extension name)

But what about to renaming multiple file extensions to nil or no file extension? How to replace this command *.(new extension name) ?

  • FooBarrington@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    No, that doesn’t work, you have to pass the suffix you want to remove to basename:

    $ touch test.txt
    $ basename test.txt
    test.txt
    $ basename test.txt .txt
    test