[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

mkdir failure

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
ittay
Asked:
ittay
  • 2
  • 2
1 Solution
 
jkrCommented:
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
 
shagun_kariCommented:
Why on Earth Would you want to do that?

0
 
ittayAuthor Commented:
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
 
ittayAuthor Commented:
to jkr:
i'm talking about NTFS. is this the case there also?
0
 
jkrCommented:
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now