Mail Archives: djgpp/2000/04/30/10:05:29
On Sun, 30 Apr 2000, Al Bundy wrote:
> I tried to restore a backuptape with CPBackup for DOS. All went well, until
> there was a directory which was to deep. Probably more than 80 characters.
> The backup program was unable to create that directory. The backup program
> itself has no trouble with long file pathes because the same program backed
> it up on tape, so it must be DOS related. I tried to make a directory
> manually with md, but it didn't work either. So it must be DOS that is
> causing the problem. The long directory is created by Windows 9x. Probably
> because of VFAT.
> How do I get past this barrier using native DOS? The tape is OK.
This is a DOS limitation: it cannot handle directories more than 8
levels deep and it cannot handle path names more than 67 characters
long.
You could try several possible work-arounds, but please note that I'm not
sure any of them will help in your case (especially if you don't have the
sources to the backup program):
- Create directories in several steps, like this:
mkdir foo\bar
cd foo\bar
mkdir baz\foobar
cd baz\foobar
etc.
- Use SUBST to hide part of the path behind a drive letter, like this:
mkdir foo\bar\baz\foobar
subst x: e:\foo\bar\baz\foobar
mkdir x:\abc\def\ghi\jkl
(here I assume that the current drive is drive e:)
- If your DOS version is 7.20 or later (the versions of DOS
which come with Windows 98), you can write a DJGPP program that uses
the mkdir library function to create the directory. These DOS
versions support a new system call to create a directory which is
limited to 128 characters instead of 67, and the DJGPP library issues
these new system calls when they are available.
Failing all of the above, you could try restoring the files into another
directory, then manually create the missing deeply-nested directory using
one of the techniques above, and move the files recirsively into their
place.
- Raw text -