#1 2022-03-24 00:51

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Long Path Solution?

I have a directory with over 100 folders, subfolders, more subfolders, that exceed 260 characters in total length.

Wondering if ReNamer has a solution to somehow 'flatten' these little monsters.

Thoughts greatly appreciated.

Nicholas Kormanik

Last edited by nkormanik (2022-03-24 00:52)

Offline

#2 2022-03-24 13:06

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Long Path Solution?

Sure, you can.
Example https://www.den4b.com/forum/viewtopic.php?id=381




But that may render your files to become useless as you drop information from path and/or filename.

Original:
Computershare , 162 South 6th Street, Suite 1600 , Louisville, KY 40202 , United States of America
Shorten:
Computshare , 162 Sou 6th Stret, Suit 16 , Louisvile, KY 402 , USoA

Will the letter arrive? Maybe yes, as a human is involved, but that doesn't works with computers.




No one can know which part is important and which not. Maybe only you are the one.

If you want to go that route, best do not rename folder names. But if you do, you must start from the lowest in hierarchy!

I would visit each folder and rename it by hand so I take control.




 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2022-03-25 01:21

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: Long Path Solution?

Yes, of course we can change the filename with ReNamer. 

(But if total path exceeds 266 characters, maybe not...)

The issue is more of flattening the huge hierarchy of folders, most particularly those whose total path length exceeds 266 characters.

Example:

Have:  F:\1xxxxx\2xxxxx\ ... \8xxxxx\9xxxxx\mysong.mp3

Want:  F:\1\mysong.mp3

Offline

#4 2022-03-25 01:25

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: Long Path Solution?

If solution is not 'single step,' possibly a multi-step preset.

That's an interesting concept.  Multi-step preset.

Think about THAT for a second.  As you know, ReNamer allows for an unlimited number of lines of steps, right?

There probably is a way of combining so that just about ANYTHING is possible.

Offline

#5 2022-03-25 02:19

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Long Path Solution?

ReNamer supports the long path specification with "\\?\" prefix, as described officially by Microsoft:
Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path Length Limitation

You can also find out more information in a prior topic:
Support for long filenames/folder names/long paths

nkormanik wrote:

Have:  F:\1xxxxx\2xxxxx\ ... \8xxxxx\9xxxxx\mysong.mp3

Want:  F:\1\mysong.mp3

That is something we can work with, but you would need to provide a complete example, even a totally made up example, it just has to follow the common naming pattern so we can help you design the right rules.

Offline

#6 2022-03-25 06:59

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: Long Path Solution?

Not sure how I would go about providing an example, aside from what I've shown above.

Let me mention how the actual issue often comes about....

I download via torrents Classical music.  The downloaded torrent comes in the form of a .rar file.  Upon unarchiving the .rar file is a root folder.  The name of the root folder is very long.  Then within that folder is, often, the exact same name for a second folder.  Very, very long.  Then, finally, there are some .flac files -- containing the music.  And the name of those files is very, very long.

Why so long?  The composer's name gets thrown in, the album name, the name of the performing artist(s), year performed, etc., etc.  All needlessly repeated.

All that stuff amounts to a total path of more than 266 characters.  In fact, some nearly 400 characters in total length/depth.

Unreal.

All I'm really after are the deeply included .flac files.

Getting at those .flac files is always an issue.  Windows, and Windows programs, generally choke, issuing some error message.

(By the way, yes I have set Windows to allow for more than 266-character path.)

Offline

#7 2022-03-25 13:33

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Long Path Solution?

nkormanik wrote:

All I'm really after are the deeply included .flac files.



Maybe you should rather use a good file manager or a script of your OS.


Example:

- create a target folder like C:\Temp\AllMyFlacs
- open a CMD window in the top main folder of your Flac-files (F: ?)

- enter this command:
for /f "delims=" %a in ('dir /b /s *.flac') Do @copy "%a" "C:\Temp\AllMyFlacs"

All Flac-files should be copied now to C:\Temp\AllMyFlacs




Is it this what you want?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#8 2022-03-25 16:12

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Long Path Solution?

You can move all flac files to a different folder, as described here:
https://www.den4b.com/wiki/ReNamer:Rena … her_folder

Alternatively, you could use Regular Expressions or Pascal Script rules to move all flac files specifically to the first/root folder.

Offline

#9 2022-03-26 01:20

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: Long Path Solution?

Good suggestions, folks.  Thanks!

Keep up the fine work.

Hope all are well.

Offline

#10 2022-08-09 13:45

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Offline

Board footer

Powered by FluxBB