Highlighted
Absent Member.
Absent Member.
893 views

File/paths too long. Tracking down the little pests

I'm posting this to help anyone that wants to track these things down on
their servers and also to see if someone's found a better way to do it.
Servers in question happen to be Netware but it should work the same
on any platform. Download Microsoft Log Parser 2.2 (works fine on win
xp and win 7)
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24659

Now say I have an L drive and I need to find anything that exceeds a
total of 260 characters.

C:\Program Files (x86)\Log Parser 2.2>logparser "select path from n:\*.*
where strlen(path)>247" -i:FS -recurse:-1 > c:\files\n-paths.txt

Now I went with 247 because you need to account for the difference
between your map and the actual UNC path length. That's going to vary
based on the environment.

Some of my servers finished in a few hours, but one volume with 3+ TB
and a ton of small files has been running for over a day and is still
cranking away. I have no idea how log parser decides to do things as
it's clearly not alphabetic. It seems to skip around. If it was in the
W's I'd say it was almost done, but It will be in the W's then the R's,
and the C's then the R's again and then T's etc.

So that works. (And wow there are a lot more of them than I thought, we
have some very verbose people here.)

Is there a better way that doesn't involve writing something in say VB?

0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

Just realized a typo. I said L drive and then had n:\*.* in the
example. Change accordingly.

0 Likes
Highlighted
Absent Member.
Absent Member.

Patrick Farrell <pfarrell@packereng.com> wrote in news:1ewEq.424$1b.351
@kovat.provo.novell.com:

> Just realized a typo. I said L drive and then had n:\*.* in the
> example. Change accordingly.
>
>


L users and N erds?

--
Ciao, Dave
0 Likes
Highlighted
Absent Member.
Absent Member.

On 12/13/2011 4:08 AM, Dave Taylor wrote:
> Patrick Farrell<pfarrell@packereng.com> wrote in news:1ewEq.424$1b.351
> @kovat.provo.novell.com:
>
>> Just realized a typo. I said L drive and then had n:\*.* in the
>> example. Change accordingly.
>>
>>

>
> L users and N erds?
>


Heh I just finished cleaning up one drive.. over 700 instances.. 2 more
network drives to go. It got especially bad when they rearranged folder
structures and moved things under existing folder trees.

0 Likes
Highlighted
Absent Member.
Absent Member.

I'm going to revise this as I think it works better this way. In the
prev example, you'd see a lot of press any key to continue in the text
file and I think sometimes it would hang there waiting for a key press
without notifying you.

logparser "select path from n:\*.* where strlen(path)>247" -i:FS -o:CSV
> c:\files\longlist.txt


Again that 247 is going to vary from person to person, you will need to
work out what the value is, but that does the trick.

0 Likes
Highlighted
Contributor.. Contributor..
Contributor..

Hi,

If you have linux, or can use the GNU tools on Windows, you can get a list as follows:

find . | grep -e '.\{247,\}'


If you were looking for asny given path component being > 100 characters, for example, you'd replace the '.' with '[^/]' which is to say "match any character that's NOT a /" Since '/' is the delimiter between path components

find . | grep -e '[^/]\{100,\}'


would find all files where any one of the path name components, including file name, was > 100 characters long.

Above looks at the current path, but you can specify any path. This lends itself to all manner of uses. On OES Linux you can do this directly from the server via scripts, on NetWare you have Bash, and of course using the GNU tools from any box that has a mapped drive.

-- Bob
0 Likes
Highlighted
Absent Member.
Absent Member.

On 12/13/2011 4:06 PM, Bob-O-Rama wrote:
>
> Hi,
>
> If you have linux, or can use the GNU tools on Windows, you can get a
> list as follows:
>
>
> Code:
> --------------------
> find . | grep -e '.\{247,\}'
> --------------------
>
>
> If you were looking for asny given path component being> 100
> characters, for example, you'd replace the '.' with '[^/]' which is to
> say "match any character that's NOT a /" Since '/' is the delimiter
> between path components
>
>
> Code:
> --------------------
> find . | grep -e '[^/]\{100,\}'
> --------------------
>
>
> would find all files where any one of the path name components,
> including file name, was> 100 characters long.
>
> Above looks at the current path, but you can specify any path. This
> lends itself to all manner of uses. On OES Linux you can do this
> directly from the server via scripts, on NetWare you have Bash, and of
> course using the GNU tools from any box that has a mapped drive.
>
> -- Bob
>
>


I know, it's trivial in Linux. Then again in Linux, we wouldn't really
need to worry about paths over 260 characters would we?

0 Likes
Highlighted
Contributor.. Contributor..
Contributor..

You have Bash on NetWare, and can get the GNU tools on any platform, so the solution is still relevant. But yeah, I understand that not everyone runs Linux, in this case the OP doesn't need to.

-- Bob
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.