PC Review Forums Newsgroups Hardware Freeware Utility to check if XP file names exceed 255 chars

Reply

Utility to check if XP file names exceed 255 chars

 
Thread Tools Rate Thread
Old 07-02-2006, 09:21 AM   #1
Mark M
Guest
 
Posts: n/a
Default Utility to check if XP file names exceed 255 chars


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.
  Reply With Quote
Old 07-02-2006, 01:38 PM   #2
Ben
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Mark M wrote:
> 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
  Reply With Quote
Old 07-02-2006, 06:35 PM   #3
Susan Bugher
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Ben wrote:
> Mark M wrote:


>> 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.


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_grou...t.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)

  Reply With Quote
Old 07-02-2006, 06:45 PM   #4
Susan Bugher
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Mark M wrote:

> 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.re...t/lback_022.zip

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_grou...t.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
  Reply With Quote
Old 08-02-2006, 09:05 AM   #5
Ben
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Susan Bugher wrote:
> 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


  Reply With Quote
Old 09-02-2006, 04:41 PM   #6
Franklin
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

On 07 Feb 2006, Ben wrote:

> 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.
  Reply With Quote
Old 09-02-2006, 08:17 PM   #7
Susan Bugher
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Ben wrote:
> Susan Bugher wrote:
>
>> 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.


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_grou...t.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)


  Reply With Quote
Old 09-02-2006, 11:13 PM   #8
Ben
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Franklin wrote:
> On 07 Feb 2006, Ben wrote:
>>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
>>

>
> 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...php?topic=288.0

HTH

Ben
  Reply With Quote
Old 10-02-2006, 01:07 AM   #9
Al Klein
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

On Thu, 09 Feb 2006 23:13:27 +0000, Ben
<notarealemail@replytothegroup.net> wrote:

>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.
  Reply With Quote
Old 10-02-2006, 10:46 AM   #10
Ben
Guest
 
Posts: n/a
Default Re: Utility to check if XP file names exceed 255 chars

Al Klein wrote:
> On Thu, 09 Feb 2006 23:13:27 +0000, Ben
> <notarealemail@replytothegroup.net> wrote:
>
>>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.

>
> 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
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off