Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Mon, 30 Jun 2008 13:34:23 -0700 (PDT),    group: microsoft.public.access.modulescoding        back       


Long paths   
Ok, I have an access module which builds an index of directories in
the subtree of a user-selected directory/drive.  Then, it goes through
those and builds another index of all the files in those directories.
I'm using the FileSystemObject just for clean code.  Here's the
problem I'm hitting.  I'm hitting the 260 character MAX_PATH limit.

The fso is reporting the correct number of files, but for the files
that exceed the limit, it acts like they're not even there.  No errors
are raised, nothing.

I've tried this in VB6, but again nothing.  I was told the kernel has
some API's I can use, but honestly, I am not that well versed in API
usage.

Bottom line, I need to be able to capture the long path of every
file.  I can use the shortpath for my metadata extraction, etc, but
for the people who use the output of this, I do need to capture the
"windows explorer" name.

Here's an example of a filepath that's too far out: (This is an actual
file that I generated for testing)

X:\shared\username
\New_Folderaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfasdfasdfasdifuasdiofuyeasdkofuheasdkjfjheaskldjfheaskdfheaskdjfheaskldjfheaskdjfhasd
\adsfdkjfheaskdjfheasldkjfheasdklfehasdfkljashdlfjksdfh.txt
date: Mon, 30 Jun 2008 09:53:53 -0700 (PDT)   author:   krazymike

Re: Long paths   
"krazymike"  wrote in message 
news:f93ff032-f3e2-4aa8-affa-6f34f47d7c84@d45g2000hsc.googlegroups.com...
> Ok, I have an access module which builds an index of directories in
> the subtree of a user-selected directory/drive.  Then, it goes through
> those and builds another index of all the files in those directories.
> I'm using the FileSystemObject just for clean code.  Here's the
> problem I'm hitting.  I'm hitting the 260 character MAX_PATH limit.
>
> The fso is reporting the correct number of files, but for the files
> that exceed the limit, it acts like they're not even there.  No errors
> are raised, nothing.
>
> I've tried this in VB6, but again nothing.  I was told the kernel has
> some API's I can use, but honestly, I am not that well versed in API
> usage.
>
> Bottom line, I need to be able to capture the long path of every
> file.  I can use the shortpath for my metadata extraction, etc, but
> for the people who use the output of this, I do need to capture the
> "windows explorer" name.
>
> Here's an example of a filepath that's too far out: (This is an actual
> file that I generated for testing)
>
> X:\shared\username
> \New_Folderaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfasdfasdfasdifuasdiofuyeasdkofuheasdkjfjheaskldjfheaskdfheaskdjfheaskldjfheaskdjfhasd
> \adsfdkjfheaskdjfheasldkjfheasdklfehasdfkljashdlfjksdfh.txt

There are a few applications that can process the full NTFS path
length of some 32,000 characters (I think), e.g. ntbackup.exe,
robocopy.exe or iexplore.exe. AFAIK, neither cscript.exe nor
wscript.exe is among them.
date: Mon, 30 Jun 2008 19:11:18 +0200   author:   Pegasus \(MVP\)

Re: Long paths   
Ok, can I call these apps and get something returned?  This data is
going into an mdb, so just being able to access them isn't enough.

On Jun 30, 12:11 pm, "Pegasus \(MVP\)"  wrote:
> "krazymike"  wrote in message
>
> news:f93ff032-f3e2-4aa8-affa-6f34f47d7c84@d45g2000hsc.googlegroups.com...
>
>
>
> > Ok, I have an access module which builds an index of directories in
> > the subtree of a user-selected directory/drive.  Then, it goes through
> > those and builds another index of all the files in those directories.
> > I'm using the FileSystemObject just for clean code.  Here's the
> > problem I'm hitting.  I'm hitting the 260 character MAX_PATH limit.
>
> > The fso is reporting the correct number of files, but for the files
> > that exceed the limit, it acts like they're not even there.  No errors
> > are raised, nothing.
>
> > I've tried this in VB6, but again nothing.  I was told the kernel has
> > some API's I can use, but honestly, I am not that well versed in API
> > usage.
>
> > Bottom line, I need to be able to capture the long path of every
> > file.  I can use the shortpath for my metadata extraction, etc, but
> > for the people who use the output of this, I do need to capture the
> > "windows explorer" name.
>
> > Here's an example of a filepath that's too far out: (This is an actual
> > file that I generated for testing)
>
> > X:\shared\username
> > \New_Folderaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfasdfasdfasdifuasdiofuyeasdkofuheasdkjfjheaskldjfheaskdfheaskdjfheaskldjfheaskdjfhasd
> > \adsfdkjfheaskdjfheasldkjfheasdklfehasdfkljashdlfjksdfh.txt
>
> There are a few applications that can process the full NTFS path
> length of some 32,000 characters (I think), e.g. ntbackup.exe,
> robocopy.exe or iexplore.exe. AFAIK, neither cscript.exe nor
> wscript.exe is among them.
date: Mon, 30 Jun 2008 10:21:21 -0700 (PDT)   author:   krazymike

Re: Long paths   
You could execute robocopy.exe /L and monitor its screen output.
A good long-term strategy would be to educate your users to put
their data into their files, not into their file/folder names.


"krazymike"  wrote in message 
news:f7416f09-1445-4aac-a5dd-8d6727516965@79g2000hsk.googlegroups.com...
Ok, can I call these apps and get something returned?  This data is
going into an mdb, so just being able to access them isn't enough.

On Jun 30, 12:11 pm, "Pegasus \(MVP\)"  wrote:
> "krazymike"  wrote in message
>
> news:f93ff032-f3e2-4aa8-affa-6f34f47d7c84@d45g2000hsc.googlegroups.com...
>
>
>
> > Ok, I have an access module which builds an index of directories in
> > the subtree of a user-selected directory/drive. Then, it goes through
> > those and builds another index of all the files in those directories.
> > I'm using the FileSystemObject just for clean code. Here's the
> > problem I'm hitting. I'm hitting the 260 character MAX_PATH limit.
>
> > The fso is reporting the correct number of files, but for the files
> > that exceed the limit, it acts like they're not even there. No errors
> > are raised, nothing.
>
> > I've tried this in VB6, but again nothing. I was told the kernel has
> > some API's I can use, but honestly, I am not that well versed in API
> > usage.
>
> > Bottom line, I need to be able to capture the long path of every
> > file. I can use the shortpath for my metadata extraction, etc, but
> > for the people who use the output of this, I do need to capture the
> > "windows explorer" name.
>
> > Here's an example of a filepath that's too far out: (This is an actual
> > file that I generated for testing)
>
> > X:\shared\username
> > \New_Folderaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfasdfasdfasdifuasdiofuyeasdkofuheasdkjfjheaskldjfheaskdfheaskdjfheaskldjfheaskdjfhasd
> > \adsfdkjfheaskdjfheasldkjfheasdklfehasdfkljashdlfjksdfh.txt
>
> There are a few applications that can process the full NTFS path
> length of some 32,000 characters (I think), e.g. ntbackup.exe,
> robocopy.exe or iexplore.exe. AFAIK, neither cscript.exe nor
> wscript.exe is among them.
date: Mon, 30 Jun 2008 20:07:30 +0200   author:   Pegasus \(MVP\)

Code to loop through and modify duplicate data   
Hello,

I'm not too familiar with VBA code; however, I think it is a solution
to my issue and would like some help please.

I have a Customer table where there are duplicates in the Name field.
I don't want to remove the duplicates. Instead I would like to add a
sequence of numbers for each of the same name.

For example:

John Doe
John Doe
John Doe
Jane Smith
Jane Smith

already in the table in the Name column to be converted to:

John Doe:1
John Doe:2
John Doe:3
Jane Smith:1
Jane Smith:2

I don't really care about which number it starts with, I just have to
have the colon and number following the name with no spaces.

Thanks,
Brett
date: Mon, 30 Jun 2008 13:34:23 -0700 (PDT)   author:   Brett Barry: Go Get Geek!

Re: Code to loop through and modify duplicate data   
On Mon, 30 Jun 2008 13:34:23 -0700 (PDT), "Brett Barry: Go Get Geek!"
 wrote:

Perhaps you can tell us more about how this customer table is used. In
most applications this would be a REALLY BAD IDEA. Why is it not in
yours?
Btw, "Name" is a reserved word and should not be used for database
field names. "CustomerName" is a better name.

-Tom.



>Hello,
>
>I'm not too familiar with VBA code; however, I think it is a solution
>to my issue and would like some help please.
>
>I have a Customer table where there are duplicates in the Name field.
>I don't want to remove the duplicates. Instead I would like to add a
>sequence of numbers for each of the same name.
>
>For example:
>
>John Doe
>John Doe
>John Doe
>Jane Smith
>Jane Smith
>
>already in the table in the Name column to be converted to:
>
>John Doe:1
>John Doe:2
>John Doe:3
>Jane Smith:1
>Jane Smith:2
>
>I don't really care about which number it starts with, I just have to
>have the colon and number following the name with no spaces.
>
>Thanks,
>Brett
date: Mon, 30 Jun 2008 21:47:52 -0700   author:   Tom van Stiphout

Re: Code to loop through and modify duplicate data   
On Mon, 30 Jun 2008 13:34:23 -0700 (PDT), "Brett Barry: Go Get Geek!"
 wrote:

>Hello,
>
>I'm not too familiar with VBA code; however, I think it is a solution
>to my issue and would like some help please.
>
>I have a Customer table where there are duplicates in the Name field.
>I don't want to remove the duplicates. Instead I would like to add a
>sequence of numbers for each of the same name.
>
>For example:
>
>John Doe
>John Doe
>John Doe
>Jane Smith
>Jane Smith
>
>already in the table in the Name column to be converted to:
>
>John Doe:1
>John Doe:2
>John Doe:3
>Jane Smith:1
>Jane Smith:2
>
>I don't really care about which number it starts with, I just have to
>have the colon and number following the name with no spaces.
>
>Thanks,
>Brett

So... if you have three customers, Jim Smith (the tall blond guy), Jim Smith
(the 80-year old bald fellow), and Jim Smith (the black software engineer who
has 11 records in the table) you want... what?

Names are NOT unique. Are you assuming that the three John Does are three
different people, or the same person with three duplicate (or partial
duplicate) records?
-- 

             John W. Vinson [MVP]
date: Tue, 01 Jul 2008 00:26:23 -0600   author:   John W. Vinson

Re: Code to loop through and modify duplicate data   
Hi,

You need to do a sequential read of the file and try to find whether the 
same name are there or not. If same name are there, then mark it as 1, next 
time 2 etc.

Coding will be like

read the file
find 'name' with same name in the file
if name is found, mark it with another name eg. name;1

read the next record,
find 'name' with same name in the file
if name is found, mark it with another name eg. name;2 (you will not find 
the previous name since it is marked as name;1

and continue to read the file until the end.

the coding should be very simple.

Wish I can help,
Raymond

"Brett Barry: Go Get Geek!"  wrote in message 
news:13a0a9e6-244c-4975-b743-4500cda4f338@b1g2000hsg.googlegroups.com...
> Hello,
>
> I'm not too familiar with VBA code; however, I think it is a solution
> to my issue and would like some help please.
>
> I have a Customer table where there are duplicates in the Name field.
> I don't want to remove the duplicates. Instead I would like to add a
> sequence of numbers for each of the same name.
>
> For example:
>
> John Doe
> John Doe
> John Doe
> Jane Smith
> Jane Smith
>
> already in the table in the Name column to be converted to:
>
> John Doe:1
> John Doe:2
> John Doe:3
> Jane Smith:1
> Jane Smith:2
>
> I don't really care about which number it starts with, I just have to
> have the colon and number following the name with no spaces.
>
> Thanks,
> Brett
date: Tue, 1 Jul 2008 21:39:55 +0900   author:   Raymond

Re: Code to loop through and modify duplicate data   
Untested - may need to be debugged

dim strHold$, strName$, i%

with rs
    .MoveFirst
    strHold=""
    i=1

    Do while not .EOF
        strName=![customername]
        if strName=strHold
            strName=strName & trim(i)
            .edit
                ![customername]=strName
            .update
            i = i + 1
        else
            strHold=strName
            i=1
        endif
        .MoveNext
    Loop

End With 'rs

By not marking the first entry with a numeric suffix, when the data is 
entered, it can be flagged as a duplicate, and possibly made unique with a 
middle initial or something.

"Brett Barry: Go Get Geek!"  wrote in message 
news:13a0a9e6-244c-4975-b743-4500cda4f338@b1g2000hsg.googlegroups.com...
> Hello,
>
> I'm not too familiar with VBA code; however, I think it is a solution
> to my issue and would like some help please.
>
> I have a Customer table where there are duplicates in the Name field.
> I don't want to remove the duplicates. Instead I would like to add a
> sequence of numbers for each of the same name.
>
> For example:
>
> John Doe
> John Doe
> John Doe
> Jane Smith
> Jane Smith
>
> already in the table in the Name column to be converted to:
>
> John Doe:1
> John Doe:2
> John Doe:3
> Jane Smith:1
> Jane Smith:2
>
> I don't really care about which number it starts with, I just have to
> have the colon and number following the name with no spaces.
>
> Thanks,
> Brett
date: Wed, 20 Aug 2008 15:15:40 -0700   author:   Margaret Bartley

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us