Solved

mkdir failure

Posted on 2000-04-10
5
315 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
  • 2
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
An article on effective troubleshooting
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

856 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