How to change MAX_PATH value?

S

sonet

I need write data to a file that filename length > 255.




Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=de
fine
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
sonet
I need write data to a file that filename length > 255.

Which filesystem? Definitely not FAT or NTFS... Or the NTFS
restriction of 255, is it per-component-of-filename, or
whole-filename?
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread

If your filesystem supports this, did you try UNC paths, like

\\.\LONG_FILE_NAME

I've heard that the newer MS kernels support these...

In short, I doubt it is a Perl limitation (but I know close to 0 about
Win*...).

Hope this helps,
Ilya
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was NOT [per weedlist] sent to
Ilya Zakharevich
[A complimentary Cc of this posting was NOT [per weedlist] sent to
sonet
I need write data to a file that filename length > 255.

Which filesystem? Definitely not FAT or NTFS... Or the NTFS
restriction of 255, is it per-component-of-filename, or
whole-filename?

I see (on WPedia):

the file system supports paths up to about 32,000 Unicode characters
with each path component (directory or filename) up to 255
characters long

So if your compiler was stupid enough to define MAX_PATH as 255, you
are hosed. Although very few places of perl will actually use it, so
if the CRTL is able to get/put short files, you are in business.

If everything else fails, write a short program which opens STDOUT to
the file, and starts your script. Eg, if your shell supports longer
file names, start your script as

yourscript.pl > long_file

Hope this helps,
Ilya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top