Utility to check if XP file names exceed 255 chars

Status
Not open for further replies.
M

Mark M

Is there a utility for XP to check if any pathname + filename of any
file in a set of folders is too long?

XP/NTFS5 actually allows you to rename and lengthen the name of
folders in the path of a file even if final pathname + filename of
some file exceeds the 255 character limit.

But when one moves a set of folders, XP will terminate the whole move
operation midway through if it comes across a too-long file name.

Nor does XP identify the path causing the problem.

So I'm looking for a utility which can do a pre-move check to
identify if any too-long names have been used.
 
B

Ben

Mark said:
Is there a utility for XP to check if any pathname + filename of any
file in a set of folders is too long?

http://www.dcsoft.com/products/longff/longff.htm does a nice job of
finding long file names, but doesn't add the paths to the length when
calculating.

I'm sure I can remember one of the freeware file renamers being able to
check path + filename length, but it rather difficult to google it back
up just with the generic term 'renamer' and 'long file names'... Maybe
someone else can remember?

If you're happy on the command line, the following bit of code will
identify combined long filenames and log them to a file, which you could
then use to remedy the problem. It's not pretty, but it works... Run
it from the root folder that you want to begin the check from :

dir /b /s | gawk "{if (length($0) > 255) print $0 \" (\" length($0) \"
chars)\"}" > longfiles.txt

With a bit of tweaking you could make it into a batch file that you
could pass the path to from the command line, then have it automatically
open the log in Notepad after the scan finishes. I guess you could
actually also add this to the context menu for directories to launch it
but you wouldn't get any pretty progress meters etc.
But when one moves a set of folders, XP will terminate the whole move
operation midway through if it comes across a too-long file name.

You could also look at a more sturdy copy/move replacement. Just tested
KillCopy which I've had installed for network transfers/large file moves
etc and although it will fail to move file with an overly long filename,
it will continue moving the rest of the files. You could then just
search the directory tree afterwards to see what files have been left
behind.

http://killprog.narod.ru/killcopye.html

HTH

Ben
 
S

Susan Bugher

Ben said:
Mark M wrote:

http://www.dcsoft.com/products/longff/longff.htm does a nice job of
finding long file names, but doesn't add the paths to the length when
calculating.

Are you sure of that? The screenshot says "Specify the starting folder
and filename length limit. . ."

Program: Long Filename Finder
Author: DC Software Design Inc. (David Ching)
Ware: Freeware
http://www.dcsoft.com/
http://www.dcsoft.com/products/longff/longff.htm
http://www.dcsoft.com/ftp/longff.zip
Apr 25, 2002 [297 KB]

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
S

Susan Bugher

Mark said:
Is there a utility for XP to check if any pathname + filename of any
file in a set of folders is too long?

XP/NTFS5 actually allows you to rename and lengthen the name of
folders in the path of a file even if final pathname + filename of
some file exceeds the 255 character limit.

But when one moves a set of folders, XP will terminate the whole move
operation midway through if it comes across a too-long file name.

Nor does XP identify the path causing the problem.

So I'm looking for a utility which can do a pre-move check to
identify if any too-long names have been used.

Perhaps do an end run with this program to backup and restore long
filenames:

Program: LBACK
Author: Herbert Reichardt
Ware: (Freeware)
http://people.freenet.de/herbert.reichardt/
http://people.freenet.de/herbert.reichardt/download.htm

Download the converter utility (src and dos exe 100k) here: lback.zip
http://people.freenet.de/herbert.reichardt/lback.zip
Update 2002/09/27 Version 0.22 (for WINXP): lback Version 0.22
http://people.freenet.de/herbert.reichardt/lback_022.zip

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
B

Ben

Susan said:
Are you sure of that? The screenshot says "Specify the starting folder
and filename length limit. . ."

100% sure - I tested it myself before commenting.

I think the name "Long Filenames Finder" means literally that - when you
fire it off, it just scans for filenames over the character limit you
specify, it doesn't scan for the pathname + filename.

I have a folder on my HD for offline backups of my fileserver, running
the batch file I also included in my post picked up a number of files
with over 255 chars total in the path + filename. Running "Long
Filenames Finder" against it with the "List files whose names are longer
than" option set to 255, it found nothing.

Regards,

Ben
 
F

Franklin

If you're happy on the command line, the following bit of code
will identify combined long filenames and log them to a file,
which you could then use to remedy the problem. It's not
pretty, but it works... Run it from the root folder that you
want to begin the check from :

dir /b /s | gawk "{if (length($0) > 255) print $0 \" (\"
length($0) \" chars)\"}" > longfiles.txt

With a bit of tweaking you could make it into a batch file that
you could pass the path to from the command line, then have it
automatically open the log in Notepad after the scan finishes.
I guess you could actually also add this to the context menu for
directories to launch it but you wouldn't get any pretty
progress meters etc.

I tried this but my XP is unhappy with GAWK.

That sounds like a unix name.
 
S

Susan Bugher

100% sure - I tested it myself before commenting.

I think the name "Long Filenames Finder" means literally that - when you
fire it off, it just scans for filenames over the character limit you
specify, it doesn't scan for the pathname + filename.

I have a folder on my HD for offline backups of my fileserver, running
the batch file I also included in my post picked up a number of files
with over 255 chars total in the path + filename. Running "Long
Filenames Finder" against it with the "List files whose names are longer
than" option set to 255, it found nothing.

Thanks very much for that information Ben. I hadn't noticed the "folder
and filename" text in the screenshot before and it made me wonder. Now
(of course) I'm wondering why the screenshot says "folder and filename".
.. . ;)

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
B

Ben

Franklin said:
I tried this but my XP is unhappy with GAWK.

That sounds like a unix name.

Sorry, by happy with the command line, I meant "happy on the command
line and willing to have a few Windows ports of *nix tools"... If you
get any Win32 version of gawk and drop it into a folder in your system
path the script should be happy.

My programming skills are far too rusty to make a nice app for this
myself, but unless something else turns up I may make a short set of
instructions for setting this up as a context menu entry.

I am still suprised that no-one else has come up with something more
friendly - surely there's a freeware gem for this out there somewhere?
The only other app I've found since the OP is a small tool called
DropCount on DonationCoder - it will show the length of the longest
filename found in a set of subfolders, but not the actual name or offer
any options to change them.

http://www.donationcoder.com/Forums/bb/index.php?topic=288.0

HTH

Ben
 
A

Al Klein

My programming skills are far too rusty to make a nice app for this
myself, but unless something else turns up I may make a short set of
instructions for setting this up as a context menu entry.
I am still suprised that no-one else has come up with something more
friendly - surely there's a freeware gem for this out there somewhere?

If you're talking about writing a GUI front end for gawk, shelling to
it and redirecting the output should work.
 
B

Ben

Al said:
If you're talking about writing a GUI front end for gawk, shelling to
it and redirecting the output should work.

I was thinking more of a 'real' app - it's easy enough to knock out
something that'll shell to a batch file, but there'd be no real way of
showing the user any progress... If you scan your whole HD for files
that may causes problems with backup apps etc that's going to be a lot
of sitting about waiting wondering what's going on!

B
 
G

Goeroeboeroe

I was thinking more of a 'real' app - it's easy enough to knock out
something that'll shell to a batch file, but there'd be no real way of
showing the user any progress... If you scan your whole HD for files
that may causes problems with backup apps etc that's going to be a lot
of sitting about waiting wondering what's going on!

B
If path and name in Start -> All Programs -> ... exceed 255 characters,
it even leads to a BSOD if you hover over the name.

Peter
 
A

Al Klein

If path and name in Start -> All Programs -> ... exceed 255 characters,
it even leads to a BSOD if you hover over the name.

But XP has no real unresolved bugs, right? :)
 
I

Intermagic

Al Klein said:
But XP has no real unresolved bugs, right? :)

So does Linux. No bugs at all :)

No, really. Why don't you try yourself? I have just created a directory
under All Programs with 530 chars. No problems at all.
 
A

Al Klein

So does Linux. No bugs at all :)

No, really. Why don't you try yourself? I have just created a directory
under All Programs with 530 chars. No problems at all.

Your screen didn't break when the name pushed out past the right edge
of the display?
 
R

Renan

From Al Klein to alt.comp.freeware:
But XP has no real unresolved bugs, right? :)

At least here, Windows XP warns me if I try to create a folder with
large file name.
 
G

Goeroeboeroe

From Al Klein to alt.comp.freeware:

At least here, Windows XP warns me if I try to create a folder with
large file name.
I don't get that warning. That's to say: maybe when I make a folder-name
that long, but not when path + name exceed 255 characters.
And no, that's no bug! Of course it isn't. It's a feature to wake you up
with a shock when you're getting sleepy! Very nice from Bill!
Took me only two days or something like that what the hell was causing
that BSOD. Finally I could replicate it, so I'm sure this was it.
And I'd be really happy with a tool to check for path + name not
exceeding 255 characters.

Peter
 
R

Renan

From Goeroeboeroe to alt.comp.freeware:
That's to say: maybe when I make a folder-name
that long, but not when path + name exceed 255 characters.
And no, that's no bug! Of course it isn't. It's a feature to wake you up
with a shock when you're getting sleepy! Very nice from Bill!
Took me only two days or something like that what the hell was causing
that BSOD. Finally I could replicate it, so I'm sure this was it.
And I'd be really happy with a tool to check for path + name not
exceeding 255 characters.

I have not been able to duplicate this. Can someone here post a step-by-
step?

[]s
 
S

SeaMaiden

Ben said:
I am still suprised that no-one else has come up with something more
friendly - surely there's a freeware gem for this out there somewhere? The
only other app I've found since the OP is a small tool called DropCount on
DonationCoder - it will show the length of the longest filename found in a
set of subfolders, but not the actual name or offer any options to change
them.

http://www.donationcoder.com/Forums/bb/index.php?topic=288.0

I'd like to see someone make a filename+path utility where you can specify
the length of the filename and a checkbox if you want the path included
also. You should be able to enter any number you wish: 8+3, 28+3, 61+3, 255.
This should be a box where you type data, not a dropdown list where you only
have a few choices. Some webforms have character limits for certain fields.
In such case, you might enter 40. This would be helpful for preparing
backups to burn CD/DVD, where the limit is 61+3, and I believe that means
filename+path.
 
K

Kittie Spit

Just to follow up on Ben's comments re Long Filename Finder. I've used
this utility for some time now and think it's wonderful. I used it in
burning files on old Win98SE and a Win95 computers where filenames for
burning couldn't exceed 64 characters or even shorter under a dying
Win95 system. I also regularly use it in XP. Never had any problems
with it.

Of note, is that you can set the file length to whatever you want to
check. IE, you can set to "1" to see all files [duh]. Or to check max
length to be allowed say by your CD burner.

I wish it could remember my settings when I fire it up -- directories
that I check regularly [a nice option it DOES have is whether you want
sub-directories included] and remembering filename length I typically
check.

Another thing, as this discussion indicates, is that I'd like the
option to include full pathnames as well, which Long Filename Finder
doesn't support.

Other than that, an excellent freeware app. A few months ago I did an
exhaustive search for any similar apps and couldn't find any. [If
anyone else has seen similar apps, let us know!]
 
G

Goeroeboeroe

From Goeroeboeroe to alt.comp.freeware:
That's to say: maybe when I make a folder-name
that long, but not when path + name exceed 255 characters.
And no, that's no bug! Of course it isn't. It's a feature to wake you up
with a shock when you're getting sleepy! Very nice from Bill!
Took me only two days or something like that what the hell was causing
that BSOD. Finally I could replicate it, so I'm sure this was it.
And I'd be really happy with a tool to check for path + name not
exceeding 255 characters.

I have not been able to duplicate this. Can someone here post a step-by-
step?

[]s
I've quite a lot of applications, so my Startmenu is pretty deep
organized. So I click for example on Start -> All Programs -> -Internet
-> Mail and Newsgroups -> Utilities -> .... -> Application
When this all together exceeds 255 characters, I get the BSOD, even if I
only hover over the name of the application.
It shouldn't be too hard to duplicate it, but maybe it has something to
do with my set-up, I don't know.

Peter
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top