f



Copy Files with long file names

Hi,

I am using CopyFile (Scripting.FileSystemObject) to copy file from one
location to another. The naming convention followed makes the file
names (+ the path) lenghty and the total characters can exceed 260
characters.

I would appreciate if you can let me know if there is any solution to
bypass max limit (Filename + Path) of 260 characters.

The copying of file from one location to another happens on the click
of a button in MS Access Forms.

Thanks in Advance.

Regards
Bala
0
bala
10/26/2010 7:43:03 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

28 Replies
1231 Views

Similar Articles

[PageSpeed] 30

Access Version : Access 2003

The files (can be any type of files like .xls, .doc, .pdf etc..) is
copied from local Computer to network drive.

0
bala
10/26/2010 7:48:59 PM
"bala" <balkiir@gmail.com> wrote in message 
news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
> Hi,
>
> I am using CopyFile (Scripting.FileSystemObject) to copy file from one
> location to another. The naming convention followed makes the file
> names (+ the path) lenghty and the total characters can exceed 260
> characters.
>
> I would appreciate if you can let me know if there is any solution to
> bypass max limit (Filename + Path) of 260 characters.
>
> The copying of file from one location to another happens on the click
> of a button in MS Access Forms.
>
> Thanks in Advance.
>
> Regards
> Bala

Well you can use short file names instead:

http://www.smccall.demon.co.uk/Strings.htm#ShortPath


0
Stuart
10/27/2010 2:42:50 AM
On Oct 26, 10:42=A0pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>
>
>
>
>
> > Hi,
>
> > I am using CopyFile (Scripting.FileSystemObject) to copy file from one
> > location to another. The naming convention followed makes the file
> > names (+ the path) lenghty and the total characters can exceed 260
> > characters.
>
> > I would appreciate if you can let me know if there is any solution to
> > bypass max limit (Filename + Path) of 260 characters.
>
> > The copying of file from one location to another happens on the click
> > of a button in MS Access Forms.
>
> > Thanks in Advance.
>
> > Regards
> > Bala
>
> Well you can use short file names instead:
>
> http://www.smccall.demon.co.uk/Strings.htm#ShortPath- Hide quoted text -
>
> - Show quoted text -

There lies the problem, the clients wants the naming convention to be
followed and the naming convention does creates long names. Any work
around?
0
bala
10/27/2010 11:42:32 AM
Can't you get the short file name at runtime to pass to your CopyFile 
procedure whilst keeping the full name stored/displayed?

Jon

"bala" <balkiir@gmail.com> wrote in message 
news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>
>
>
>
>
> > Hi,
>
> > I am using CopyFile (Scripting.FileSystemObject) to copy file from one
> > location to another. The naming convention followed makes the file
> > names (+ the path) lenghty and the total characters can exceed 260
> > characters.
>
> > I would appreciate if you can let me know if there is any solution to
> > bypass max limit (Filename + Path) of 260 characters.
>
> > The copying of file from one location to another happens on the click
> > of a button in MS Access Forms.
>
> > Thanks in Advance.
>
> > Regards
> > Bala
>
> Well you can use short file names instead:
>
> http://www.smccall.demon.co.uk/Strings.htm#ShortPath- Hide quoted text -
>
> - Show quoted text -

There lies the problem, the clients wants the naming convention to be
followed and the naming convention does creates long names. Any work
around? 


0
Jon
10/27/2010 1:35:37 PM
On Oct 27, 9:35=A0am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
wrote:
> Can't you get the short file name at runtime to pass to your CopyFile
> procedure whilst keeping the full name stored/displayed?
>
> Jon
>
> "bala" <balk...@gmail.com> wrote in message
>
> news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
> On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
>
>
>
>
> > "bala" <balk...@gmail.com> wrote in message
>
> >news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com..=
..
>
> > > Hi,
>
> > > I am using CopyFile (Scripting.FileSystemObject) to copy file from on=
e
> > > location to another. The naming convention followed makes the file
> > > names (+ the path) lenghty and the total characters can exceed 260
> > > characters.
>
> > > I would appreciate if you can let me know if there is any solution to
> > > bypass max limit (Filename + Path) of 260 characters.
>
> > > The copying of file from one location to another happens on the click
> > > of a button in MS Access Forms.
>
> > > Thanks in Advance.
>
> > > Regards
> > > Bala
>
> > Well you can use short file names instead:
>
> >http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hide quoted text -
>
> > - Show quoted text -
>
> There lies the problem, the clients wants the naming convention to be
> followed and the naming convention does creates long names. Any work
> around?- Hide quoted text -
>
> - Show quoted text -

That is a good suggestion but the client wants the files to be named
according to the naming convention (translated : long name). According
to them they want to identify the nature of the file by glancing at
the name.

What I also tried is using the short dummy name to copy file using
CopyFile and  then tried to rename it with the long name but it didn't
work out.

I have search web and couldn't find any solution for it as Windows XP
as a max limit of 260 characters when NTFS file system can handle upto
32,000 char.

To be honest I think the bottom line is as per Stuart and your
suggestion the File Name (inclusive of the Path) have to be restricted
to less than 240 chars (to be on a safer side). A file name (including
Path) with lenght of 253 Chars also created problem.

If there is any work around well it would be nice if not have to start
the long never ending process of convincing the Client.
0
bala
10/27/2010 6:51:04 PM
bala wrote:
> On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> wrote:
> 
>>Can't you get the short file name at runtime to pass to your CopyFile
>>procedure whilst keeping the full name stored/displayed?
>>
>>Jon
>>
>>"bala" <balk...@gmail.com> wrote in message
>>
>>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
>>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>
>>
>>
>>
>>
>>
>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>>
>>>>Hi,
>>
>>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from one
>>>>location to another. The naming convention followed makes the file
>>>>names (+ the path) lenghty and the total characters can exceed 260
>>>>characters.
>>
>>>>I would appreciate if you can let me know if there is any solution to
>>>>bypass max limit (Filename + Path) of 260 characters.
>>
>>>>The copying of file from one location to another happens on the click
>>>>of a button in MS Access Forms.
>>
>>>>Thanks in Advance.
>>
>>>>Regards
>>>>Bala
>>
>>>Well you can use short file names instead:
>>
>>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hide quoted text -
>>
>>>- Show quoted text -
>>
>>There lies the problem, the clients wants the naming convention to be
>>followed and the naming convention does creates long names. Any work
>>around?- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
> That is a good suggestion but the client wants the files to be named
> according to the naming convention (translated : long name). According
> to them they want to identify the nature of the file by glancing at
> the name.
> 
> What I also tried is using the short dummy name to copy file using
> CopyFile and  then tried to rename it with the long name but it didn't
> work out.
> 
> I have search web and couldn't find any solution for it as Windows XP
> as a max limit of 260 characters when NTFS file system can handle upto
> 32,000 char.
> 
> To be honest I think the bottom line is as per Stuart and your
> suggestion the File Name (inclusive of the Path) have to be restricted
> to less than 240 chars (to be on a safer side). A file name (including
> Path) with lenght of 253 Chars also created problem.
> 
> If there is any work around well it would be nice if not have to start
> the long never ending process of convincing the Client.

Where are you copying the file to; network or C: drive?

What is so long; the filename or the folder name?  If folder name, you 
can map a drive letter
   Set WshNetwork = CreateObject("WScript.Network")
   WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"

Then you'd copy the file to drive L:

If your filename is 250 chars+, wow!

0
Salad
10/27/2010 8:25:45 PM
On Oct 27, 4:25=A0pm, Salad <sa...@oilandvinegar.com> wrote:
> bala wrote:
> > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> > wrote:
>
> >>Can't you get the short file name at runtime to pass to your CopyFile
> >>procedure whilst keeping the full name stored/displayed?
>
> >>Jon
>
> >>"bala" <balk...@gmail.com> wrote in message
>
> >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com.=
...
> >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
> >>>"bala" <balk...@gmail.com> wrote in message
>
> >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com=
....
>
> >>>>Hi,
>
> >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from on=
e
> >>>>location to another. The naming convention followed makes the file
> >>>>names (+ the path) lenghty and the total characters can exceed 260
> >>>>characters.
>
> >>>>I would appreciate if you can let me know if there is any solution to
> >>>>bypass max limit (Filename + Path) of 260 characters.
>
> >>>>The copying of file from one location to another happens on the click
> >>>>of a button in MS Access Forms.
>
> >>>>Thanks in Advance.
>
> >>>>Regards
> >>>>Bala
>
> >>>Well you can use short file names instead:
>
> >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequoted text -
>
> >>>- Show quoted text -
>
> >>There lies the problem, the clients wants the naming convention to be
> >>followed and the naming convention does creates long names. Any work
> >>around?- Hide quoted text -
>
> >>- Show quoted text -
>
> > That is a good suggestion but the client wants the files to be named
> > according to the naming convention (translated : long name). According
> > to them they want to identify the nature of the file by glancing at
> > the name.
>
> > What I also tried is using the short dummy name to copy file using
> > CopyFile and =A0then tried to rename it with the long name but it didn'=
t
> > work out.
>
> > I have search web and couldn't find any solution for it as Windows XP
> > as a max limit of 260 characters when NTFS file system can handle upto
> > 32,000 char.
>
> > To be honest I think the bottom line is as per Stuart and your
> > suggestion the File Name (inclusive of the Path) have to be restricted
> > to less than 240 chars (to be on a safer side). A file name (including
> > Path) with lenght of 253 Chars also created problem.
>
> > If there is any work around well it would be nice if not have to start
> > the long never ending process of convincing the Client.
>
> Where are you copying the file to; network or C: drive?
>
> What is so long; the filename or the folder name? =A0If folder name, you
> can map a drive letter
> =A0 =A0Set WshNetwork =3D CreateObject("WScript.Network")
> =A0 =A0WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> Then you'd copy the file to drive L:
>
> If your filename is 250 chars+, wow!- Hide quoted text -
>
> - Show quoted text -

I am copying the file to network drive and yes it is 250 Chars +. That
is problem. Sometimes there maybe one subfolder or 2 at the max. The
name of the file (following the naming convention) tends to be
long.That is the killer here.
0
bala
10/27/2010 8:31:48 PM
"bala" <balkiir@gmail.com> wrote in message 
news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
> bala wrote:
> > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> > wrote:
>
> >>Can't you get the short file name at runtime to pass to your CopyFile
> >>procedure whilst keeping the full name stored/displayed?
>
> >>Jon
>
> >>"bala" <balk...@gmail.com> wrote in message
>
> >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
> >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
> >>>"bala" <balk...@gmail.com> wrote in message
>
> >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>
> >>>>Hi,
>
> >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from one
> >>>>location to another. The naming convention followed makes the file
> >>>>names (+ the path) lenghty and the total characters can exceed 260
> >>>>characters.
>
> >>>>I would appreciate if you can let me know if there is any solution to
> >>>>bypass max limit (Filename + Path) of 260 characters.
>
> >>>>The copying of file from one location to another happens on the click
> >>>>of a button in MS Access Forms.
>
> >>>>Thanks in Advance.
>
> >>>>Regards
> >>>>Bala
>
> >>>Well you can use short file names instead:
>
> >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequoted text -
>
> >>>- Show quoted text -
>
> >>There lies the problem, the clients wants the naming convention to be
> >>followed and the naming convention does creates long names. Any work
> >>around?- Hide quoted text -
>
> >>- Show quoted text -
>
> > That is a good suggestion but the client wants the files to be named
> > according to the naming convention (translated : long name). According
> > to them they want to identify the nature of the file by glancing at
> > the name.
>
> > What I also tried is using the short dummy name to copy file using
> > CopyFile and then tried to rename it with the long name but it didn't
> > work out.
>
> > I have search web and couldn't find any solution for it as Windows XP
> > as a max limit of 260 characters when NTFS file system can handle upto
> > 32,000 char.
>
> > To be honest I think the bottom line is as per Stuart and your
> > suggestion the File Name (inclusive of the Path) have to be restricted
> > to less than 240 chars (to be on a safer side). A file name (including
> > Path) with lenght of 253 Chars also created problem.
>
> > If there is any work around well it would be nice if not have to start
> > the long never ending process of convincing the Client.
>
> Where are you copying the file to; network or C: drive?
>
> What is so long; the filename or the folder name? If folder name, you
> can map a drive letter
> Set WshNetwork = CreateObject("WScript.Network")
> WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> Then you'd copy the file to drive L:
>
> If your filename is 250 chars+, wow!- Hide quoted text -
>
> - Show quoted text -

> I am copying the file to network drive and yes it is 250 Chars +. That
> is problem. Sometimes there maybe one subfolder or 2 at the max. The
> name of the file (following the naming convention) tends to be
> long.That is the killer here.

Well if your client insists on sticking with FAT32 file system then the only 
(sensible) solution is to redesign the naming convention. They've 
overstepped the mark, unfortunately.


0
Stuart
10/27/2010 9:18:36 PM
On Oct 27, 5:18=A0pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
> On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>
>
>
>
>
> > bala wrote:
> > > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> > > wrote:
>
> > >>Can't you get the short file name at runtime to pass to your CopyFile
> > >>procedure whilst keeping the full name stored/displayed?
>
> > >>Jon
>
> > >>"bala" <balk...@gmail.com> wrote in message
>
> > >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.co=
m...
> > >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
> > >>>"bala" <balk...@gmail.com> wrote in message
>
> > >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.c=
om...
>
> > >>>>Hi,
>
> > >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from =
one
> > >>>>location to another. The naming convention followed makes the file
> > >>>>names (+ the path) lenghty and the total characters can exceed 260
> > >>>>characters.
>
> > >>>>I would appreciate if you can let me know if there is any solution =
to
> > >>>>bypass max limit (Filename + Path) of 260 characters.
>
> > >>>>The copying of file from one location to another happens on the cli=
ck
> > >>>>of a button in MS Access Forms.
>
> > >>>>Thanks in Advance.
>
> > >>>>Regards
> > >>>>Bala
>
> > >>>Well you can use short file names instead:
>
> > >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtext =
-
>
> > >>>- Show quoted text -
>
> > >>There lies the problem, the clients wants the naming convention to be
> > >>followed and the naming convention does creates long names. Any work
> > >>around?- Hide quoted text -
>
> > >>- Show quoted text -
>
> > > That is a good suggestion but the client wants the files to be named
> > > according to the naming convention (translated : long name). Accordin=
g
> > > to them they want to identify the nature of the file by glancing at
> > > the name.
>
> > > What I also tried is using the short dummy name to copy file using
> > > CopyFile and then tried to rename it with the long name but it didn't
> > > work out.
>
> > > I have search web and couldn't find any solution for it as Windows XP
> > > as a max limit of 260 characters when NTFS file system can handle upt=
o
> > > 32,000 char.
>
> > > To be honest I think the bottom line is as per Stuart and your
> > > suggestion the File Name (inclusive of the Path) have to be restricte=
d
> > > to less than 240 chars (to be on a safer side). A file name (includin=
g
> > > Path) with lenght of 253 Chars also created problem.
>
> > > If there is any work around well it would be nice if not have to star=
t
> > > the long never ending process of convincing the Client.
>
> > Where are you copying the file to; network or C: drive?
>
> > What is so long; the filename or the folder name? If folder name, you
> > can map a drive letter
> > Set WshNetwork =3D CreateObject("WScript.Network")
> > WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> > Then you'd copy the file to drive L:
>
> > If your filename is 250 chars+, wow!- Hide quoted text -
>
> > - Show quoted text -
> > I am copying the file to network drive and yes it is 250 Chars +. That
> > is problem. Sometimes there maybe one subfolder or 2 at the max. The
> > name of the file (following the naming convention) tends to be
> > long.That is the killer here.
>
> Well if your client insists on sticking with FAT32 file system then the o=
nly
> (sensible) solution is to redesign the naming convention. They've
> overstepped the mark, unfortunately.- Hide quoted text -
>
> - Show quoted text -

Sorry for the confusion, what the client as is NTFS File System even
then the limitation (Max Lenght of 260) comes into play because of
Windows XP.
0
bala
10/27/2010 9:50:05 PM
Stuart McCall wrote:

> "bala" <balkiir@gmail.com> wrote in message 
> news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
> On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
> 
>>bala wrote:
>>
>>>On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
>>>wrote:
>>
>>>>Can't you get the short file name at runtime to pass to your CopyFile
>>>>procedure whilst keeping the full name stored/displayed?
>>
>>>>Jon
>>
>>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
>>>>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>
>>>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>>
>>>>>>Hi,
>>
>>>>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from one
>>>>>>location to another. The naming convention followed makes the file
>>>>>>names (+ the path) lenghty and the total characters can exceed 260
>>>>>>characters.
>>
>>>>>>I would appreciate if you can let me know if there is any solution to
>>>>>>bypass max limit (Filename + Path) of 260 characters.
>>
>>>>>>The copying of file from one location to another happens on the click
>>>>>>of a button in MS Access Forms.
>>
>>>>>>Thanks in Advance.
>>
>>>>>>Regards
>>>>>>Bala
>>
>>>>>Well you can use short file names instead:
>>
>>>>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequoted text -
>>
>>>>>- Show quoted text -
>>
>>>>There lies the problem, the clients wants the naming convention to be
>>>>followed and the naming convention does creates long names. Any work
>>>>around?- Hide quoted text -
>>
>>>>- Show quoted text -
>>
>>>That is a good suggestion but the client wants the files to be named
>>>according to the naming convention (translated : long name). According
>>>to them they want to identify the nature of the file by glancing at
>>>the name.
>>
>>>What I also tried is using the short dummy name to copy file using
>>>CopyFile and then tried to rename it with the long name but it didn't
>>>work out.
>>
>>>I have search web and couldn't find any solution for it as Windows XP
>>>as a max limit of 260 characters when NTFS file system can handle upto
>>>32,000 char.
>>
>>>To be honest I think the bottom line is as per Stuart and your
>>>suggestion the File Name (inclusive of the Path) have to be restricted
>>>to less than 240 chars (to be on a safer side). A file name (including
>>>Path) with lenght of 253 Chars also created problem.
>>
>>>If there is any work around well it would be nice if not have to start
>>>the long never ending process of convincing the Client.
>>
>>Where are you copying the file to; network or C: drive?
>>
>>What is so long; the filename or the folder name? If folder name, you
>>can map a drive letter
>>Set WshNetwork = CreateObject("WScript.Network")
>>WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>>
>>Then you'd copy the file to drive L:
>>
>>If your filename is 250 chars+, wow!- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
>>I am copying the file to network drive and yes it is 250 Chars +. That
>>is problem. Sometimes there maybe one subfolder or 2 at the max. The
>>name of the file (following the naming convention) tends to be
>>long.That is the killer here.
> 
> 
> Well if your client insists on sticking with FAT32 file system then the only 
> (sensible) solution is to redesign the naming convention. They've 
> overstepped the mark, unfortunately.
> 
> 
bala said "According to them they want to identify the nature of the 
file by glancing at the name."  A filename of 260+chars is not glancing, 
that's reading a sentence per filename.  If one wants to glance, your 
suggestion of redesigning the naming convention makes sense. Or store 
the long stuff to a memo field in a table and copy to a short name.

0
Salad
10/27/2010 9:52:09 PM
"bala" <balkiir@gmail.com> wrote in message 
news:9938d961-6015-4e55-b3ad-53a2f2e56115@y23g2000yqd.googlegroups.com...
On Oct 27, 5:18 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
> On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>
>
>
>
>
> > bala wrote:
> > > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> > > wrote:
>
> > >>Can't you get the short file name at runtime to pass to your CopyFile
> > >>procedure whilst keeping the full name stored/displayed?
>
> > >>Jon
>
> > >>"bala" <balk...@gmail.com> wrote in message
>
> > >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
> > >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
> > >>>"bala" <balk...@gmail.com> wrote in message
>
> > >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>
> > >>>>Hi,
>
> > >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from 
> > >>>>one
> > >>>>location to another. The naming convention followed makes the file
> > >>>>names (+ the path) lenghty and the total characters can exceed 260
> > >>>>characters.
>
> > >>>>I would appreciate if you can let me know if there is any solution 
> > >>>>to
> > >>>>bypass max limit (Filename + Path) of 260 characters.
>
> > >>>>The copying of file from one location to another happens on the 
> > >>>>click
> > >>>>of a button in MS Access Forms.
>
> > >>>>Thanks in Advance.
>
> > >>>>Regards
> > >>>>Bala
>
> > >>>Well you can use short file names instead:
>
> > >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtext -
>
> > >>>- Show quoted text -
>
> > >>There lies the problem, the clients wants the naming convention to be
> > >>followed and the naming convention does creates long names. Any work
> > >>around?- Hide quoted text -
>
> > >>- Show quoted text -
>
> > > That is a good suggestion but the client wants the files to be named
> > > according to the naming convention (translated : long name). According
> > > to them they want to identify the nature of the file by glancing at
> > > the name.
>
> > > What I also tried is using the short dummy name to copy file using
> > > CopyFile and then tried to rename it with the long name but it didn't
> > > work out.
>
> > > I have search web and couldn't find any solution for it as Windows XP
> > > as a max limit of 260 characters when NTFS file system can handle upto
> > > 32,000 char.
>
> > > To be honest I think the bottom line is as per Stuart and your
> > > suggestion the File Name (inclusive of the Path) have to be restricted
> > > to less than 240 chars (to be on a safer side). A file name (including
> > > Path) with lenght of 253 Chars also created problem.
>
> > > If there is any work around well it would be nice if not have to start
> > > the long never ending process of convincing the Client.
>
> > Where are you copying the file to; network or C: drive?
>
> > What is so long; the filename or the folder name? If folder name, you
> > can map a drive letter
> > Set WshNetwork = CreateObject("WScript.Network")
> > WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> > Then you'd copy the file to drive L:
>
> > If your filename is 250 chars+, wow!- Hide quoted text -
>
> > - Show quoted text -
> > I am copying the file to network drive and yes it is 250 Chars +. That
> > is problem. Sometimes there maybe one subfolder or 2 at the max. The
> > name of the file (following the naming convention) tends to be
> > long.That is the killer here.
>
> Well if your client insists on sticking with FAT32 file system then the 
> only
> (sensible) solution is to redesign the naming convention. They've
> overstepped the mark, unfortunately.- Hide quoted text -
>
> - Show quoted text -

> Sorry for the confusion, what the client as is NTFS File System even
> then the limitation (Max Lenght of 260) comes into play because of
> Windows XP.

OIC. Well they've still overstepped. IMO they need to see if there's a way 
to abbreviate at least part(s) of the name while leaving it still 
recognisable. After all, as Salad says, it can hardly be 'glanced' as it 
stands.


0
Stuart
10/27/2010 9:59:23 PM
On Oct 27, 5:59=A0pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:9938d961-6015-4e55-b3ad-53a2f2e56115@y23g2000yqd.googlegroups.com...
> On Oct 27, 5:18 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
>
>
>
>
> > "bala" <balk...@gmail.com> wrote in message
>
> >news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com..=
..
> > On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>
> > > bala wrote:
> > > > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com=
>
> > > > wrote:
>
> > > >>Can't you get the short file name at runtime to pass to your CopyFi=
le
> > > >>procedure whilst keeping the full name stored/displayed?
>
> > > >>Jon
>
> > > >>"bala" <balk...@gmail.com> wrote in message
>
> > > >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.=
com...
> > > >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrot=
e:
>
> > > >>>"bala" <balk...@gmail.com> wrote in message
>
> > > >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups=
..com...
>
> > > >>>>Hi,
>
> > > >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file fro=
m
> > > >>>>one
> > > >>>>location to another. The naming convention followed makes the fil=
e
> > > >>>>names (+ the path) lenghty and the total characters can exceed 26=
0
> > > >>>>characters.
>
> > > >>>>I would appreciate if you can let me know if there is any solutio=
n
> > > >>>>to
> > > >>>>bypass max limit (Filename + Path) of 260 characters.
>
> > > >>>>The copying of file from one location to another happens on the
> > > >>>>click
> > > >>>>of a button in MS Access Forms.
>
> > > >>>>Thanks in Advance.
>
> > > >>>>Regards
> > > >>>>Bala
>
> > > >>>Well you can use short file names instead:
>
> > > >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtex=
t-
>
> > > >>>- Show quoted text -
>
> > > >>There lies the problem, the clients wants the naming convention to =
be
> > > >>followed and the naming convention does creates long names. Any wor=
k
> > > >>around?- Hide quoted text -
>
> > > >>- Show quoted text -
>
> > > > That is a good suggestion but the client wants the files to be name=
d
> > > > according to the naming convention (translated : long name). Accord=
ing
> > > > to them they want to identify the nature of the file by glancing at
> > > > the name.
>
> > > > What I also tried is using the short dummy name to copy file using
> > > > CopyFile and then tried to rename it with the long name but it didn=
't
> > > > work out.
>
> > > > I have search web and couldn't find any solution for it as Windows =
XP
> > > > as a max limit of 260 characters when NTFS file system can handle u=
pto
> > > > 32,000 char.
>
> > > > To be honest I think the bottom line is as per Stuart and your
> > > > suggestion the File Name (inclusive of the Path) have to be restric=
ted
> > > > to less than 240 chars (to be on a safer side). A file name (includ=
ing
> > > > Path) with lenght of 253 Chars also created problem.
>
> > > > If there is any work around well it would be nice if not have to st=
art
> > > > the long never ending process of convincing the Client.
>
> > > Where are you copying the file to; network or C: drive?
>
> > > What is so long; the filename or the folder name? If folder name, you
> > > can map a drive letter
> > > Set WshNetwork =3D CreateObject("WScript.Network")
> > > WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> > > Then you'd copy the file to drive L:
>
> > > If your filename is 250 chars+, wow!- Hide quoted text -
>
> > > - Show quoted text -
> > > I am copying the file to network drive and yes it is 250 Chars +. Tha=
t
> > > is problem. Sometimes there maybe one subfolder or 2 at the max. The
> > > name of the file (following the naming convention) tends to be
> > > long.That is the killer here.
>
> > Well if your client insists on sticking with FAT32 file system then the
> > only
> > (sensible) solution is to redesign the naming convention. They've
> > overstepped the mark, unfortunately.- Hide quoted text -
>
> > - Show quoted text -
> > Sorry for the confusion, what the client as is NTFS File System even
> > then the limitation (Max Lenght of 260) comes into play because of
> > Windows XP.
>
> OIC. Well they've still overstepped. IMO they need to see if there's a wa=
y
> to abbreviate at least part(s) of the name while leaving it still
> recognisable. After all, as Salad says, it can hardly be 'glanced' as it
> stands.- Hide quoted text -
>
> - Show quoted text -

Yeah you are right. :o). I have started the long process of convincing
the Client to use short name for files and have both the short name
and long name stored in a table for mapping purpose. I can seethe
Quality Control and Audit team creating a ruckus.

Thanks Stuart. Thanks to Jon and Salad too.

Note: if at all there is a work around found (anytime down the line) I
would definitely appreciate if the solution is posted here.
0
bala
10/27/2010 10:09:58 PM
bala wrote:

> On Oct 27, 5:59 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> 
>>"bala" <balk...@gmail.com> wrote in message
>>
>>news:9938d961-6015-4e55-b3ad-53a2f2e56115@y23g2000yqd.googlegroups.com...
>>On Oct 27, 5:18 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>
>>
>>
>>
>>
>>
>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
>>>On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>>
>>>>bala wrote:
>>>>
>>>>>On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
>>>>>wrote:
>>
>>>>>>Can't you get the short file name at runtime to pass to your CopyFile
>>>>>>procedure whilst keeping the full name stored/displayed?
>>
>>>>>>Jon
>>
>>>>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>>>>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
>>>>>>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>
>>>>>>>"bala" <balk...@gmail.com> wrote in message
>>
>>>>>>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>>
>>>>>>>>Hi,
>>
>>>>>>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from
>>>>>>>>one
>>>>>>>>location to another. The naming convention followed makes the file
>>>>>>>>names (+ the path) lenghty and the total characters can exceed 260
>>>>>>>>characters.
>>
>>>>>>>>I would appreciate if you can let me know if there is any solution
>>>>>>>>to
>>>>>>>>bypass max limit (Filename + Path) of 260 characters.
>>
>>>>>>>>The copying of file from one location to another happens on the
>>>>>>>>click
>>>>>>>>of a button in MS Access Forms.
>>
>>>>>>>>Thanks in Advance.
>>
>>>>>>>>Regards
>>>>>>>>Bala
>>
>>>>>>>Well you can use short file names instead:
>>
>>>>>>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtext-
>>
>>>>>>>- Show quoted text -
>>
>>>>>>There lies the problem, the clients wants the naming convention to be
>>>>>>followed and the naming convention does creates long names. Any work
>>>>>>around?- Hide quoted text -
>>
>>>>>>- Show quoted text -
>>
>>>>>That is a good suggestion but the client wants the files to be named
>>>>>according to the naming convention (translated : long name). According
>>>>>to them they want to identify the nature of the file by glancing at
>>>>>the name.
>>
>>>>>What I also tried is using the short dummy name to copy file using
>>>>>CopyFile and then tried to rename it with the long name but it didn't
>>>>>work out.
>>
>>>>>I have search web and couldn't find any solution for it as Windows XP
>>>>>as a max limit of 260 characters when NTFS file system can handle upto
>>>>>32,000 char.
>>
>>>>>To be honest I think the bottom line is as per Stuart and your
>>>>>suggestion the File Name (inclusive of the Path) have to be restricted
>>>>>to less than 240 chars (to be on a safer side). A file name (including
>>>>>Path) with lenght of 253 Chars also created problem.
>>
>>>>>If there is any work around well it would be nice if not have to start
>>>>>the long never ending process of convincing the Client.
>>
>>>>Where are you copying the file to; network or C: drive?
>>
>>>>What is so long; the filename or the folder name? If folder name, you
>>>>can map a drive letter
>>>>Set WshNetwork = CreateObject("WScript.Network")
>>>>WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>>
>>>>Then you'd copy the file to drive L:
>>
>>>>If your filename is 250 chars+, wow!- Hide quoted text -
>>
>>>>- Show quoted text -
>>>>I am copying the file to network drive and yes it is 250 Chars +. That
>>>>is problem. Sometimes there maybe one subfolder or 2 at the max. The
>>>>name of the file (following the naming convention) tends to be
>>>>long.That is the killer here.
>>
>>>Well if your client insists on sticking with FAT32 file system then the
>>>only
>>>(sensible) solution is to redesign the naming convention. They've
>>>overstepped the mark, unfortunately.- Hide quoted text -
>>
>>>- Show quoted text -
>>>Sorry for the confusion, what the client as is NTFS File System even
>>>then the limitation (Max Lenght of 260) comes into play because of
>>>Windows XP.
>>
>>OIC. Well they've still overstepped. IMO they need to see if there's a way
>>to abbreviate at least part(s) of the name while leaving it still
>>recognisable. After all, as Salad says, it can hardly be 'glanced' as it
>>stands.- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
> Yeah you are right. :o). I have started the long process of convincing
> the Client to use short name for files and have both the short name
> and long name stored in a table for mapping purpose. I can seethe
> Quality Control and Audit team creating a ruckus.
> 
> Thanks Stuart. Thanks to Jon and Salad too.
> 
> Note: if at all there is a work around found (anytime down the line) I
> would definitely appreciate if the solution is posted here.

I think trying to overcome the limitations of an OS will be futile.  I 
would consider bringing in a network guy with you to the big boys that 
can offer suggestions like "Are you f'ing crazy?"

I sometimes wish there were a property, maybe called Purpose, where a 
filename, when saved, could have a memo attached to it.  When one does a 
dir or via Explorer one sees that property field in the list as well. 
MS could have done that years ago.

This is something that you can test.  Maybe try to do a low level 
Create() and write/create your own Copy routine...IOW read the file from 
the C: drive and write to the network drive.  But if it is your local 
drive that accepts really long names and the server doesn't that won't help.

Maybe you can convince the company to buy brand new computers and 
servers throughout that can accept the new really long file names.  It 
might cost many thousands of dollars but they will get what they desire.

0
Salad
10/28/2010 12:08:09 AM
"Salad" <salad@oilandvinegar.com> wrote in message 
news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com...
> bala wrote:
>
>> On Oct 27, 5:59 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>
>>>"bala" <balk...@gmail.com> wrote in message
>>>
>>> ...
>>>>>I am copying the file to network drive and yes it is 250 Chars +. 
>>>>>That
>>>>>is problem. Sometimes there maybe one subfolder or 2 at the max. 
>>>>>The
>>>>>name of the file (following the naming convention) tends to be
>>>>>long.That is the killer here.
>>>
>>>>Well if your client insists on sticking with FAT32 file system then 
>>>>the
>>>>only
>>>>(sensible) solution is to redesign the naming convention. They've
>>>>overstepped the mark, unfortunately.- Hide quoted text -
>>>
>>>>- Show quoted text -
>>>>Sorry for the confusion, what the client as is NTFS File System even
>>>>then the limitation (Max Lenght of 260) comes into play because of
>>>>Windows XP.
>>>
>>>...
>
> I sometimes wish there were a property, maybe called Purpose, where a 
> filename, when saved, could have a memo attached to it.  When one does 
> a dir or via Explorer one sees that property field in the list as 
> well. MS could have done that years ago.
> ...

On Win XP using Windows Explorer I have added either the "Title" or 
"Comments" columns to the detail view and populated that property 
manually. I don't know how to display that data using Dir, but it sure 
is handy in explorer.

Are those properties available through the scripting filesystem object? 
[Summary tab on file properties dialog sheet.]

Seems like that might be an alternative to investigate.

-- 
Clif McIrvin

(clare reads his mail with moe, nomail finds the bit bucket :-)


0
Clif
10/28/2010 12:53:14 AM
"Clif McIrvin" <clare.nomail@gmail.com> wrote in message 
news:iaahhs$3r8$1@news.eternal-september.org...
> "Salad" <salad@oilandvinegar.com> wrote in message 
> news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com...
>> bala wrote:
>>
>>> On Oct 27, 5:59 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>>>
>>>>"bala" <balk...@gmail.com> wrote in message
>>>>
>>>> ...
>>>>>>I am copying the file to network drive and yes it is 250 Chars +. That
>>>>>>is problem. Sometimes there maybe one subfolder or 2 at the max. The
>>>>>>name of the file (following the naming convention) tends to be
>>>>>>long.That is the killer here.
>>>>
>>>>>Well if your client insists on sticking with FAT32 file system then the
>>>>>only
>>>>>(sensible) solution is to redesign the naming convention. They've
>>>>>overstepped the mark, unfortunately.- Hide quoted text -
>>>>
>>>>>- Show quoted text -
>>>>>Sorry for the confusion, what the client as is NTFS File System even
>>>>>then the limitation (Max Lenght of 260) comes into play because of
>>>>>Windows XP.
>>>>
>>>>...
>>
>> I sometimes wish there were a property, maybe called Purpose, where a 
>> filename, when saved, could have a memo attached to it.  When one does a 
>> dir or via Explorer one sees that property field in the list as well. MS 
>> could have done that years ago.
>> ...
>
> On Win XP using Windows Explorer I have added either the "Title" or 
> "Comments" columns to the detail view and populated that property 
> manually. I don't know how to display that data using Dir, but it sure is 
> handy in explorer.
>
> Are those properties available through the scripting filesystem object? 
> [Summary tab on file properties dialog sheet.]

Yes they are. Good thinking. I'd forgotten Custom file properties. 
Definitely worth investigating.

To bala: Take a look at this page for clues:

http://www.activexperts.com/activmonitor/windowsmanagement/scripts/storage/filesystems/#CCDP.htm

>
> Seems like that might be an alternative to investigate.
>
> -- 
> Clif McIrvin
>
> (clare reads his mail with moe, nomail finds the bit bucket :-)
>
> 


0
Stuart
10/28/2010 8:52:48 AM
Stuart McCall wrote:
> "Clif McIrvin" <clare.nomail@gmail.com> wrote in message 
> news:iaahhs$3r8$1@news.eternal-september.org...
> 
>>"Salad" <salad@oilandvinegar.com> wrote in message 
>>news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com...
>>>I sometimes wish there were a property, maybe called Purpose, where a 
>>>filename, when saved, could have a memo attached to it.  When one does a 
>>>dir or via Explorer one sees that property field in the list as well. MS 
>>>could have done that years ago.
>>>...
>>
>>On Win XP using Windows Explorer I have added either the "Title" or 
>>"Comments" columns to the detail view and populated that property 
>>manually. I don't know how to display that data using Dir, but it sure is 
>>handy in explorer.
>>
>>Are those properties available through the scripting filesystem object? 
>>[Summary tab on file properties dialog sheet.]
> 
> Yes they are. Good thinking. I'd forgotten Custom file properties. 
> Definitely worth investigating.
> 
> To bala: Take a look at this page for clues:
> 
> http://www.activexperts.com/activmonitor/windowsmanagement/scripts/storage/filesystems/#CCDP.htm
> 

Very cool.  I notice that if I added Category or Description to display 
in the folder it is specific to the folder, not all folders.  Is each 
folder's property set individually or can it be set globally?  Would you 
need to inform each user to tag the folder/folders for each one they 
wanted to view?  For example, UserA sees the property and UserB doesn't 
unless they did it?


0
Salad
10/28/2010 3:15:14 PM
"Salad" <salad@oilandvinegar.com> wrote in message 
news:hrydnWtyB_UeDlTRnZ2dnUVZ_j-dnZ2d@earthlink.com...
> Stuart McCall wrote:
>> "Clif McIrvin" <clare.nomail@gmail.com> wrote in message 
>> news:iaahhs$3r8$1@news.eternal-september.org...
>>
>>>"Salad" <salad@oilandvinegar.com> wrote in message 
>>>news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com...
>>>>I sometimes wish there were a property, maybe called Purpose, where 
>>>>a filename, when saved, could have a memo attached to it.  When one 
>>>>does a dir or via Explorer one sees that property field in the list 
>>>>as well. MS could have done that years ago.
>>>>...
>>>
>>>On Win XP using Windows Explorer I have added either the "Title" or 
>>>"Comments" columns to the detail view and populated that property 
>>>manually. I don't know how to display that data using Dir, but it 
>>>sure is handy in explorer.
>>>
>>>Are those properties available through the scripting filesystem 
>>>object? [Summary tab on file properties dialog sheet.]
>>
>> Yes they are. Good thinking. I'd forgotten Custom file properties. 
>> Definitely worth investigating.
>>
>> To bala: Take a look at this page for clues:
>>
>> http://www.activexperts.com/activmonitor/windowsmanagement/scripts/storage/filesystems/#CCDP.htm
>>
>
> Very cool.  I notice that if I added Category or Description to 
> display in the folder it is specific to the folder, not all folders. 
> Is each folder's property set individually or can it be set globally? 
> Would you need to inform each user to tag the folder/folders for each 
> one they wanted to view?  For example, UserA sees the property and 
> UserB doesn't unless they did it?
>
>


I think you are looking for a response from someone with more experience 
than I.

I'm pretty certain the Folder Options settings are per user.  At a 
guess, this information is somewhere in the registry, so you should be 
able to control it from code (policy, maybe?). As to individual folders, 
the View tab of the Folder Options dialog (Tools | Folder Options from 
explorer, also available in Control Panel) has a button to apply the 
current view settings to every folder.

-- 
Clif McIrvin

(clare reads his mail with moe, nomail finds the bit bucket :-)


0
Clif
10/28/2010 3:36:41 PM
"Stuart McCall" <smccall@myunrealbox.com> wrote in
news:8h1yo.30150$tb2.22713@newsfe06.ams2: 

> Well they've still overstepped. IMO they need to see if there's a
> way to abbreviate at least part(s) of the name while leaving it
> still recognisable. After all, as Salad says, it can hardly be
> 'glanced' as it stands.

Better yet, map a share closer to the destination, instead of in the
root of the drive. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
contact via website only     http://www.dfenton.com/DFA/
0
David
10/28/2010 8:59:23 PM
Salad <salad@oilandvinegar.com> wrote in
news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com: 

> I sometimes wish there were a property, maybe called Purpose,
> where a filename, when saved, could have a memo attached to it. 
> When one does a dir or via Explorer one sees that property field
> in the list as well. MS could have done that years ago.

With Office files, that already exists.

-- 
David W. Fenton                  http://www.dfenton.com/ 
contact via website only     http://www.dfenton.com/DFA/
0
David
10/28/2010 9:01:00 PM
Salad <salad@oilandvinegar.com> wrote in
news:NZSdnS9boImXAlXRnZ2dnUVZ_uOdnZ2d@earthlink.com: 

> bala said "According to them they want to identify the nature of
> the file by glancing at the name."  A filename of 260+chars is not
> glancing, that's reading a sentence per filename.  If one wants to
> glance, your suggestion of redesigning the naming convention makes
> sense. Or store the long stuff to a memo field in a table and copy
> to a short name. 

I miss being able to vote up an answer when not reading
StackOverflow.com. This would definitely get a +1 vote from me. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
contact via website only     http://www.dfenton.com/DFA/
0
David
10/28/2010 9:02:25 PM
David-W-Fenton wrote:

> Salad <salad@oilandvinegar.com> wrote in
> news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com: 
> 
> 
>>I sometimes wish there were a property, maybe called Purpose,
>>where a filename, when saved, could have a memo attached to it. 
>>When one does a dir or via Explorer one sees that property field
>>in the list as well. MS could have done that years ago.
> 
> 
> With Office files, that already exists.
> 
Yes.  Looking at google it appears one needs to dl a file called DSOFile 
  then registering the ActiveX but I saw mention of Office in some 
threads.  Not having needed such a capability it is nice to know it exists.
0
Salad
10/28/2010 9:04:38 PM
On Wed, 27 Oct 2010 13:25:45 -0700, Salad <salad@oilandvinegar.com>
wrote:
  
>What is so long; the filename or the folder name?  If folder name, you 
>can map a drive letter
>   Set WshNetwork = CreateObject("WScript.Network")
>   WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
>Then you'd copy the file to drive L:

I doubt very much that you can get around this problem by assiing a
drive letter to a share.  I stronglyI suspect in Windows of any sort
the length of the server name, share name, folders and file name is a
maximum of 260.    

The drive letter plus the file name is a lot shorter on your system
but the file server won't allow you to use that file name.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
0
Tony
10/29/2010 12:32:30 AM
On Oct 28, 8:32=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
> On Wed, 27 Oct 2010 13:25:45 -0700, Salad <sa...@oilandvinegar.com>
> wrote:
>
> >What is so long; the filename or the folder name? =A0If folder name, you
> >can map a drive letter
> > =A0 Set WshNetwork =3D CreateObject("WScript.Network")
> > =A0 WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> >Then you'd copy the file to drive L:
>
> I doubt very much that you can get around this problem by assiing a
> drive letter to a share. =A0I stronglyI suspect in Windows of any sort
> the length of the server name, share name, folders and file name is a
> maximum of 260. =A0 =A0
>
> The drive letter plus the file name is a lot shorter on your system
> but the file server won't allow you to use that file name.
>
> Tony
> --
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
> =A0 updated seehttp://www.autofeupdater.com/

I will definitely take a look at the custom file property.

Stuart I definitely will look into it.

Also I did a simple test. I manually renamed an existing Excel file
(contain Data) with a long name (253 char lenght).  The long name was
accepted but when I tried to open Excel file it gave me a error that
the file name is too long. When I reverted back to the original short
name or any short name it opened fine and displayed the Data.

Since Windows XP (and I believe Windows 7 too) handles max lenght of
260 I believe even if we successfully rename and copy any files with
long name the behaviour of the copied file can be unpredictable.

Thanks again.
0
bala
10/29/2010 11:52:45 AM
Salad <salad@oilandvinegar.com> wrote in
news:V4ydnWV_WdD6eFTRnZ2dnUVZ_q6dnZ2d@earthlink.com: 

> David-W-Fenton wrote:
> 
>> Salad <salad@oilandvinegar.com> wrote in
>> news:Hqqdnbxa6fd3I1XRnZ2dnUVZ_qudnZ2d@earthlink.com: 
>> 
>>>I sometimes wish there were a property, maybe called Purpose,
>>>where a filename, when saved, could have a memo attached to it. 
>>>When one does a dir or via Explorer one sees that property field
>>>in the list as well. MS could have done that years ago.
>> 
>> With Office files, that already exists.
>
> Yes.  Looking at google it appears one needs to dl a file called
> DSOFile 
>   then registering the ActiveX but I saw mention of Office in some
> threads.  Not having needed such a capability it is nice to know
> it exists. 

My FileSearch class module already does that. The bizarro thing is
that  the DLL doesn't know anything about the Access
meta-properties. 

  http://dfenton.com/DFA/download/Access/FileSearch.html

-- 
David W. Fenton                  http://www.dfenton.com/ 
contact via website only     http://www.dfenton.com/DFA/
0
David
10/29/2010 10:05:32 PM
bala <balkiir@gmail.com> wrote in
news:e6d2a90e-d54a-4b03-8c34-74372be51eeb@s4g2000yql.googlegroups.com
: 

> Since Windows XP (and I believe Windows 7 too) handles max lenght
> of 260 I believe even if we successfully rename and copy any files
> with long name the behaviour of the copied file can be
> unpredictable. 

If things are consistent with the past, the 260 limit is on the full
path and filename, not just the filename itself. That would mean
that a 100-character path could not have files with names over 160
in length and still be accessible. 

I wonder, though, if that could be gotten round with the File System
Object by loading the list of files into a collection or array. Or,
if the FSO has a collection where you could access the files by
index and then check the name without the path. 

Likely not, since to do anything from there the FSO would still have
to use the full path/name, but it's worth a shot. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
contact via website only     http://www.dfenton.com/DFA/
0
David
10/29/2010 10:08:36 PM
> I'm pretty certain the Folder Options settings are per user.  At a
> guess, this information is somewhere in the registry, so you should be
> able to control it from code (policy, maybe?). As to individual folders,
> the View tab of the Folder Options dialog (Tools | Folder Options from
> explorer, also available in Control Panel) has a button to apply the
> current view settings to every folder.

if my knowledge isn't obsolete, it is saved in seperate streams - a
rare known NTFS feature. When copied to a fat device the properties is
lost. Some file properties, like exif data to jpg is file content.
0
Benny
10/31/2010 9:00:42 AM
On Oct 27, 5:59=A0pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:9938d961-6015-4e55-b3ad-53a2f2e56115@y23g2000yqd.googlegroups.com...
> On Oct 27, 5:18 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
>
>
> > "bala" <balk...@gmail.com> wrote in message
>
> >news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com..=
..
> > On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>
> > > bala wrote:
> > > > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com=
>
> > > > wrote:
>
> > > >>Can't you get the short file name at runtime to pass to your CopyFi=
le
> > > >>procedure whilst keeping the full name stored/displayed?
>
> > > >>Jon
>
> > > >>"bala" <balk...@gmail.com> wrote in message
>
> > > >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.=
com...
> > > >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrot=
e:
>
> > > >>>"bala" <balk...@gmail.com> wrote in message
>
> > > >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups=
..com...
>
> > > >>>>Hi,
>
> > > >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file fro=
m
> > > >>>>one
> > > >>>>location to another. The naming convention followed makes the fil=
e
> > > >>>>names (+ the path) lenghty and the total characters can exceed 26=
0
> > > >>>>characters.
>
> > > >>>>I would appreciate if you can let me know if there is any solutio=
n
> > > >>>>to
> > > >>>>bypass max limit (Filename + Path) of 260 characters.
>
> > > >>>>The copying of file from one location to another happens on the
> > > >>>>click
> > > >>>>of a button in MS Access Forms.
>
> > > >>>>Thanks in Advance.
>
> > > >>>>Regards
> > > >>>>Bala
>
> > > >>>Well you can use short file names instead:
>
> > > >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtex=
t-
>
> > > >>>- Show quoted text -
>
> > > >>There lies the problem, the clients wants the naming convention to =
be
> > > >>followed and the naming convention does creates long names. Any wor=
k
> > > >>around?- Hide quoted text -
>
> > > >>- Show quoted text -
>
> > > > That is a good suggestion but the client wants the files to be name=
d
> > > > according to the naming convention (translated : long name). Accord=
ing
> > > > to them they want to identify the nature of the file by glancing at
> > > > the name.
>
> > > > What I also tried is using the short dummy name to copy file using
> > > > CopyFile and then tried to rename it with the long name but it didn=
't
> > > > work out.
>
> > > > I have search web and couldn't find any solution for it as Windows =
XP
> > > > as a max limit of 260 characters when NTFS file system can handle u=
pto
> > > > 32,000 char.
>
> > > > To be honest I think the bottom line is as per Stuart and your
> > > > suggestion the File Name (inclusive of the Path) have to be restric=
ted
> > > > to less than 240 chars (to be on a safer side). A file name (includ=
ing
> > > > Path) with lenght of 253 Chars also created problem.
>
> > > > If there is any work around well it would be nice if not have to st=
art
> > > > the long never ending process of convincing the Client.
>
> > > Where are you copying the file to; network or C: drive?
>
> > > What is so long; the filename or the folder name? If folder name, you
> > > can map a drive letter
> > > Set WshNetwork =3D CreateObject("WScript.Network")
> > > WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> > > Then you'd copy the file to drive L:
>
> > > If your filename is 250 chars+, wow!- Hide quoted text -
>
> > > - Show quoted text -
> > > I am copying the file to network drive and yes it is 250 Chars +. Tha=
t
> > > is problem. Sometimes there maybe one subfolder or 2 at the max. The
> > > name of the file (following the naming convention) tends to be
> > > long.That is the killer here.
>
> > Well if your client insists on sticking with FAT32 file system then the
> > only
> > (sensible) solution is to redesign the naming convention. They've
> > overstepped the mark, unfortunately.- Hide quoted text -
>
> > - Show quoted text -
> > Sorry for the confusion, what the client as is NTFS File System even
> > then the limitation (Max Lenght of 260) comes into play because of
> > Windows XP.
>
> OIC. Well they've still overstepped. IMO they need to see if there's a wa=
y
> to abbreviate at least part(s) of the name while leaving it still
> recognisable. After all, as Salad says, it can hardly be 'glanced' as it
> stands.

IC2.  IMO, the OS file system names are a poor choice as a database
container, even if WinFS pops up someday with some nice OS database
features.  It seems that your customer has taken the concept to its
illogical extreme.  Many years ago I had a customer that really wanted
data with "clever" enhancements that would enable him to categorize
the data by sight - obviously something to avoid putting into the
actual data from a database perspective.  Yet such idiosyncrasies are
typical of the situations asked for by customers.  Ideally, you want
to accommodate the customer's desires without resorting to
questionable database practices.  I.e., some ingenuity is in order to
accomplish both.  I think your customer has passed the point where
satisfying both goals is possible.  From my experience, even when
satisfying both goals is possible, using the OS file names as a pseudo
database leads to inefficiencies that increase dramatically over time.

James A. Fortune
CDMAPoster@FortuneJames.com
0
James
11/1/2010 4:00:16 PM
"James A. Fortune" <CDMAPoster@FortuneJames.com> wrote in message 
news:1204484f-1d3b-4a39-ad1f-58f9dbc2439b@p1g2000yqm.googlegroups.com...
On Oct 27, 5:59 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
> "bala" <balk...@gmail.com> wrote in message
>
> news:9938d961-6015-4e55-b3ad-53a2f2e56115@y23g2000yqd.googlegroups.com...
> On Oct 27, 5:18 pm, "Stuart McCall" <smcc...@myunrealbox.com> wrote:
>
>
>
> > "bala" <balk...@gmail.com> wrote in message
>
> >news:106f1fbf-d6f2-423c-9edd-98aaf46876c4@l17g2000yqe.googlegroups.com...
> > On Oct 27, 4:25 pm, Salad <sa...@oilandvinegar.com> wrote:
>
> > > bala wrote:
> > > > On Oct 27, 9:35 am, "Jon Lewis" <jon.le...@cutthespambtinternet.com>
> > > > wrote:
>
> > > >>Can't you get the short file name at runtime to pass to your 
> > > >>CopyFile
> > > >>procedure whilst keeping the full name stored/displayed?
>
> > > >>Jon
>
> > > >>"bala" <balk...@gmail.com> wrote in message
>
> > > >>news:45a6e5b9-9c49-4e07-af9d-45d4878126b4@y23g2000yqd.googlegroups.com...
> > > >>On Oct 26, 10:42 pm, "Stuart McCall" <smcc...@myunrealbox.com> 
> > > >>wrote:
>
> > > >>>"bala" <balk...@gmail.com> wrote in message
>
> > > >>>news:7836c18b-b7b6-4470-bab6-1b7ffab8f277@r14g2000yqa.googlegroups.com...
>
> > > >>>>Hi,
>
> > > >>>>I am using CopyFile (Scripting.FileSystemObject) to copy file from
> > > >>>>one
> > > >>>>location to another. The naming convention followed makes the file
> > > >>>>names (+ the path) lenghty and the total characters can exceed 260
> > > >>>>characters.
>
> > > >>>>I would appreciate if you can let me know if there is any solution
> > > >>>>to
> > > >>>>bypass max limit (Filename + Path) of 260 characters.
>
> > > >>>>The copying of file from one location to another happens on the
> > > >>>>click
> > > >>>>of a button in MS Access Forms.
>
> > > >>>>Thanks in Advance.
>
> > > >>>>Regards
> > > >>>>Bala
>
> > > >>>Well you can use short file names instead:
>
> > > >>>http://www.smccall.demon.co.uk/Strings.htm#ShortPath-Hidequotedtext-
>
> > > >>>- Show quoted text -
>
> > > >>There lies the problem, the clients wants the naming convention to 
> > > >>be
> > > >>followed and the naming convention does creates long names. Any work
> > > >>around?- Hide quoted text -
>
> > > >>- Show quoted text -
>
> > > > That is a good suggestion but the client wants the files to be named
> > > > according to the naming convention (translated : long name). 
> > > > According
> > > > to them they want to identify the nature of the file by glancing at
> > > > the name.
>
> > > > What I also tried is using the short dummy name to copy file using
> > > > CopyFile and then tried to rename it with the long name but it 
> > > > didn't
> > > > work out.
>
> > > > I have search web and couldn't find any solution for it as Windows 
> > > > XP
> > > > as a max limit of 260 characters when NTFS file system can handle 
> > > > upto
> > > > 32,000 char.
>
> > > > To be honest I think the bottom line is as per Stuart and your
> > > > suggestion the File Name (inclusive of the Path) have to be 
> > > > restricted
> > > > to less than 240 chars (to be on a safer side). A file name 
> > > > (including
> > > > Path) with lenght of 253 Chars also created problem.
>
> > > > If there is any work around well it would be nice if not have to 
> > > > start
> > > > the long never ending process of convincing the Client.
>
> > > Where are you copying the file to; network or C: drive?
>
> > > What is so long; the filename or the folder name? If folder name, you
> > > can map a drive letter
> > > Set WshNetwork = CreateObject("WScript.Network")
> > > WshNetwork.MapNetworkDrive "L:", "\\mydrive\share"
>
> > > Then you'd copy the file to drive L:
>
> > > If your filename is 250 chars+, wow!- Hide quoted text -
>
> > > - Show quoted text -
> > > I am copying the file to network drive and yes it is 250 Chars +. That
> > > is problem. Sometimes there maybe one subfolder or 2 at the max. The
> > > name of the file (following the naming convention) tends to be
> > > long.That is the killer here.
>
> > Well if your client insists on sticking with FAT32 file system then the
> > only
> > (sensible) solution is to redesign the naming convention. They've
> > overstepped the mark, unfortunately.- Hide quoted text -
>
> > - Show quoted text -
> > Sorry for the confusion, what the client as is NTFS File System even
> > then the limitation (Max Lenght of 260) comes into play because of
> > Windows XP.
>
> OIC. Well they've still overstepped. IMO they need to see if there's a way
> to abbreviate at least part(s) of the name while leaving it still
> recognisable. After all, as Salad says, it can hardly be 'glanced' as it
> stands.

> IC2.  IMO, the OS file system names are a poor choice as a database
> container, even if WinFS pops up someday with some nice OS database
> features.  It seems that your customer has taken the concept to its
> illogical extreme.  Many years ago I had a customer that really wanted
> data with "clever" enhancements that would enable him to categorize
> the data by sight - obviously something to avoid putting into the
> actual data from a database perspective.  Yet such idiosyncrasies are
> typical of the situations asked for by customers.  Ideally, you want
> to accommodate the customer's desires without resorting to
> questionable database practices.  I.e., some ingenuity is in order to
> accomplish both.  I think your customer has passed the point where
> satisfying both goals is possible.  From my experience, even when
> satisfying both goals is possible, using the OS file names as a pseudo
> database leads to inefficiencies that increase dramatically over time.
>
> James A. Fortune
> CDMAPoster@FortuneJames.com

I know you're not addressing me, but I'd like to say: Well Put.


0
Stuart
11/1/2010 6:22:41 PM
Reply: