?
Solved

mkdir failure

Posted on 2000-04-10
5
Medium Priority
?
345 Views
Last Modified: 2013-12-28
Hello,

I've created 12 nested directories. Then I tried to create another one (in the 13th level) with a 200 character name. The mkdir command fails with a "filename too long" error.

Do you know why? How can I solve this (I can cut the name to smaller directories names, but I need to know the maximum length I can use)

Thanx,
Ittay
0
Comment
Question by:ittay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 2699950
The maximum length of a path under Win32 is limited to 260 characters. The following line is from 'windef.h', part of the MS Software Development Kit:

#define MAX_PATH          260

This value is fixed at the time MS builds the OS, and there's - except for MS - no way to change it (as all other software relies on it, too). So I think you'll have to cut down the names...

0
 
LVL 1

Expert Comment

by:shagun_kari
ID: 2699989
Why on Earth Would you want to do that?

0
 

Author Comment

by:ittay
ID: 2700039
to shagun_kari:
because i need to. this is something a programm i'm writing does. i don't go about trying to type mkdir for long names.
0
 

Author Comment

by:ittay
ID: 2700051
to jkr:
i'm talking about NTFS. is this the case there also?
0
 
LVL 86

Expert Comment

by:jkr
ID: 2700386
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question