Solved

mkdir failure

Posted on 2000-04-10
5
325 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
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…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

749 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