Remove characters from middle in filename

General discussion related to "Everything".
Post Reply
donotbugme
Posts: 43
Joined: Mon Oct 16, 2017 10:33 am

Remove characters from middle in filename

Post by donotbugme »

I copied lots of files with long file name (+256 char) to my windows, now most of the windows applications are not able to access those files.

How do i remove characters from middle and keep the beginning and end part of filename via rename function?

Thanks :)
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Remove characters from middle in filename

Post by NotNull »

Please post some examples and their matching desired new filenames.
donotbugme
Posts: 43
Joined: Mon Oct 16, 2017 10:33 am

Re: Remove characters from middle in filename

Post by donotbugme »

  • @poplens_official GLOWY NATURAL 1DAY MOCHABROWNグローイ ナチュラル ワンデイ モカブラウン🫧ツヤツヤと輝く水光カラコン🫧#水光カラコン ナチュラルなハイライターパターンと淡くやわらかなサークルラインがちゅるんと立体的な目元演出1Day(10枚入り)・DIA 14.2mm 着色直径 13.0mm 含水率 43%・G 3225805241408509784_3225805236090035345.jpg.json

    @powderroom_jp パウダールーム のビューティーアンバサダー【ビューティーアイドル】に就任!!☺︎🤍今回はそのWelcome Boxを紹介☟-espoir @espoir_jp PRO TAILOR BE VELVET COVER CUSHION21 IVORY アイボリーSPF34 PA++ セミマットの高密着クッションファンデーション-NAM 3251100935228499876_3251100929767730393.jpg

    ☆☆[bewants]アイセラムスティック写真 ①after ②before 目の周りの小じわや、たるみ改善スチールボールによってマッサージや目の浮腫み改善にも🤍目だけではなく首やほうれい線、自分の気になる部分に全て使えます☺︎これを機にスキンケアしながら目をもっとケアするように( ˙-˙ )マッサージ出来て保湿されて使いやすいー【1週間使って…】目の下のシワ気に 3207750334168408797_3207742501414600163.json

    ☆☆[bewants]アイセラムスティック写真 ①after ②before 目の周りの小じわや、たるみ改善スチールボールによってマッサージや目の浮腫み 3207750334168408797.json

    !!☺︎🤍今回はそのWelcome Boxを紹介☟-espoir @espoir_jp PRO TAILOR BE VELVET COVER CUSHION21 IVORY アイボリーSPF34 PA++ セミマットの高密着クッションファンデーション-NAM 3251100935228499876.jpg

Last part is a unique identifier (IE 3251100935228499876, 3207750334168408797_3207742501414600163 ect) and first part of the file name is for easier human readability/identify, under 200 character is much better for windows.

File name length is vary, i think its best to trim equally from middle to both side or trim backward to title from UID.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Remove characters from middle in filename

Post by NotNull »

NotNull wrote: Sun Feb 16, 2025 4:42 pm and their matching desired new filenames
As you didn't provide that, my interpretation:
First 50 characters of filename + __ + unique identifier + rest of filename.

- Selaect all files (CTRL+A)
- Press F2
- Uncheck all checkboxes
- Check Regular Expressions
- Old format:
^(.*?)([0-9_]{15,})(\..*)$

- New Format:
[left:\1,50]__\2\3

- Check New Filenames box
- If results are as expected, press OK
Post Reply