Script tested on Windows 10 64bit.
- Install git bash from https://git-for-windows.github.io/
Git allows to use linux commands on windows. - Open Git Bash Command Line
Simply right-click on a folder in Windows Explorer to access the BASH or GUI.
https://git-for-windows.github.io/img/gw1.png - You can use "mv" command to rename "VeryLongFileName.ext" to "shortFileName.ext" like this:
mv "VeryLongFileName.ext" "shortFileName.ext" - If you need to rename a lot of files in folder use shorten.sh below.
Save shorten.sh to folder where you need to rename files.
Open git bash in folder that contains shorten.sh.
You can change maxLen in shorten.sh from 100 to desired shortened file length.
Run in bash terminal "sh shorten.sh".
It will also output resulting file names like:
Renamed ./Sonocaine - Quad City Berlin/SON_Quad_City_Berlin_002 - Large Main Road Junction, Cars And Heavy Trucks Passing Slowly, Ambulance Siren At Top, Occasional Car Horns, Big Rattling Truck At Tail (Neue Nationalgalerie) - Front Omni.wav to ./Sonocaine - Quad City Berlin/SON_Quad_City_Berlin_002 - Large Main Road Junction, Cars And Heavy T.wav
You can also try to use windows-style renaming approach (if you OS version supports it):
https://superuser.com/questions/638123/how-to-rename-a-too-long-file-name
Note: To rename a file with long file name you can try to rename it by using the short (8+3) windows name. This doesnt work with filenames which start with #+some numbers. Also "dir /x" doesn't seem to work in Win10.
https://answers.microsoft.com/en-us/windows/forum/windows8_1-files/file-name-too-long-unable-to-rename-or-delete-the/bbc7419e-23fe-4e09-a381-720eeec9670f