Solved

mkdir failure

Posted on 2000-04-10
5
277 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
Comment Utility
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
Comment Utility
Why on Earth Would you want to do that?

0
 

Author Comment

by:ittay
Comment Utility
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
Comment Utility
to jkr:
i'm talking about NTFS. is this the case there also?
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now