dbTalk Databases Forums  

Copy Files with long file names

comp.databases.ms-access comp.databases.ms-access


Discuss Copy Files with long file names in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bala
 
Posts: n/a

Default Copy Files with long file names - 10-26-2010 , 02:43 PM






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

Reply With Quote
  #2  
Old   
bala
 
Posts: n/a

Default Re: Copy Files with long file names - 10-26-2010 , 02:48 PM






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.

Reply With Quote
  #3  
Old   
Stuart McCall
 
Posts: n/a

Default Re: Copy Files with long file names - 10-26-2010 , 09:42 PM



"bala" <balkiir (AT) gmail (DOT) com> wrote

Quote:
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

Reply With Quote
  #4  
Old   
bala
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 06:42 AM



On Oct 26, 10:42*pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:
Quote:
"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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?

Reply With Quote
  #5  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 08:35 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 (AT) gmail (DOT) com> wrote

On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:
Quote:
"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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?

Reply With Quote
  #6  
Old   
bala
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 01:51 PM



On Oct 27, 9:35*am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
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... (AT) gmail (DOT) com> wrote in message

news:45a6e5b9-9c49-4e07-af9d-45d4878126b4 (AT) y23g2000yqd (DOT) googlegroups.com...
On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:





"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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/Strin...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.

Reply With Quote
  #7  
Old   
Salad
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 03:25 PM



bala wrote:
Quote:
On Oct 27, 9:35 am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) 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... (AT) gmail (DOT) com> wrote in message

news:45a6e5b9-9c49-4e07-af9d-45d4878126b4 (AT) y23g2000yqd (DOT) googlegroups.com...
On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:






"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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/Strin...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!

Reply With Quote
  #8  
Old   
bala
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 03:31 PM



On Oct 27, 4:25*pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote:
Quote:
bala wrote:
On Oct 27, 9:35 am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) 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... (AT) gmail (DOT) com> wrote in message

news:45a6e5b9-9c49-4e07-af9d-45d4878126b4 (AT) y23g2000yqd (DOT) googlegroups.com....
On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:

"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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/Strin...ath-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.

Reply With Quote
  #9  
Old   
Stuart McCall
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 04:18 PM



"bala" <balkiir (AT) gmail (DOT) com> wrote

On Oct 27, 4:25 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote:
Quote:
bala wrote:
On Oct 27, 9:35 am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) 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... (AT) gmail (DOT) com> wrote in message

news:45a6e5b9-9c49-4e07-af9d-45d4878126b4 (AT) y23g2000yqd (DOT) googlegroups.com...
On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:

"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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/Strin...ath-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.

Reply With Quote
  #10  
Old   
bala
 
Posts: n/a

Default Re: Copy Files with long file names - 10-27-2010 , 04:50 PM



On Oct 27, 5:18*pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:
Quote:
"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:106f1fbf-d6f2-423c-9edd-98aaf46876c4 (AT) l17g2000yqe (DOT) googlegroups.com...
On Oct 27, 4:25 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote:





bala wrote:
On Oct 27, 9:35 am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) 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... (AT) gmail (DOT) com> wrote in message

news:45a6e5b9-9c49-4e07-af9d-45d4878126b4 (AT) y23g2000yqd (DOT) googlegroups.com...
On Oct 26, 10:42 pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:

"bala" <balk... (AT) gmail (DOT) com> wrote in message

news:7836c18b-b7b6-4470-bab6-1b7ffab8f277 (AT) r14g2000yqa (DOT) 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/Strin...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.

Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.