fat16 en xcopy

Página 1/3
| 2 | 3

Por diederick76

Expert (114)

Imagen del diederick76

04-04-2006, 10:18

Hi everyone,

I am having trouble using xcopy with fat16 with my Sunrise IDE harddisk. I am trying to copy the directories and files of entire fat12 partitions to a fat16 partition using this:

xcopy d:\*.* b:\ /h/s/e

where d: is the fat12 (source) and b: the fat16 (target) partiton.

The first few hundred files are okay, however, after a certain point I get this:

*** Invalid attributes

It does this always after writing the first one or two files in a newly created directory. The attributes of the source file are no different than any of the previously succesfully copied files. It doesn't say whether its the attributes of the source or target file are wrong or what's wrong with them, but the target directory's content is sometimes garbled beyond any use.

When I try to xcopy another directory after that, the same happens. I can still copy files to the created target directories using the normal copy command and use those, even if the xcopied files in that directory are garbled.

I tried using two different harddisks. Both have this problem.

Someone (I forgot who - sorry) suggested I should try cd-ing to the target and not specifying it in the command, but that didn't make any difference.

My questions:
1. is xcopy supposed to be okay with fat16?
2. if there some fat16-aware utility I can use instead? I don't feel like issuing hundreds of mkdir and copy commands.

I am using fat16 driver 0.11 and command2.com version 2.41.

Login sesión o register para postear comentarios

Por snout

Ascended (15186)

Imagen del snout

04-04-2006, 10:26

I don't think xcopy is fat16-compatible, but afaik Multi Mente gets the job done as it should. (of course, you should have a FAT16-compatible version of Multi Mente)

Por diederick76

Expert (114)

Imagen del diederick76

04-04-2006, 10:36

I have a patched version of Multi Mente 2.07k (at least in the readme it says its a k version) which seems to work fine with fat16, but it has the exact same problem. It doesn't mention the attributes, but does the copying okay until after so many files. Then it garbles a created target directory. Since I have to confirm every mkdir action in Multi Mente, I didn't allow it to go on.

Actually in text about this on the Sunrise website, right after the patch instructions for mm, it says that one should use the DOS copy command for copying files. I assumed that meant that mm can't really be trusted with this when working on fat16.

btw is libdos2 by Arnold Metselaar which I found on MSX Banzai! fat16-compatible? Then I could try making something myself.

Por [D-Tail]

Ascended (8239)

Imagen del [D-Tail]

04-04-2006, 11:05

MultiMente's quite unsafe to use on FAT16 partitions as well. As far as my experience goes, reading dirs goes fine, while writing files/dirs results in data corruption. Better use the good old DOS 'copy' directive Smile

Por diederick76

Expert (114)

Imagen del diederick76

04-04-2006, 11:24

When typing help on my MSX-DOS2 prompt, I get a list of commands including things like IFF, PUSHD, POPD and such. I couldn't find documentation on those however. Could I use them to make some kind of a batch file which can recursively copy directories and their contents?

Another question: is BASIC's copy safe for fat16?

Por [D-Tail]

Ascended (8239)

Imagen del [D-Tail]

04-04-2006, 13:15

I don't know the details about IFF, PUSHD and POPD, to be honest it's the first time I heard about them. Are you sure they're standard DOS2 programs? In any event, for the helpfiles (which you get by typing e.g. 'HELP CD'), DOS2 will look in the path given in the environment variable 'HELP'. You can set this for example like 'SET HELP=A:\DOS2\HELP\". This HELP directory should contain all sorts of .HLP files, For example the file CD.HLP contains help for the CD command (duh Tongue). Can you find IFF.HLP, PUSHD.HLP and POPD.HLP? Then their contents would be useful, I bet Wink

BASIC's copy directive is FAT16-safe.

Por diederick76

Expert (114)

Imagen del diederick76

04-04-2006, 14:17

I don't know the details about IFF, PUSHD and POPD, to be honest it's the first time I heard about them. Are you sure they're standard DOS2 programs?

I don't know anything about them. I'm at my work right now so I can't really take a look. I know that the help command is just a type /p which looks in a directory indicated by the help environment var. The funny thing is, help without arguments gives me a list of everything it claims to have helpfiles about. However, helpfiles about said command are not there. I'm kind of hoping someone reading this forum has them.

BASIC's copy directive is FAT16-safe.

That's a releave Smile. I wasn't really looking forward to spending next weekend typing mkdir and copy. Now I can try doing it a bit more intelligent.

But if copy is safe, are all BASIC's disk operations fat16-safe?

Por arnold_m

Master (173)

Imagen del arnold_m

04-04-2006, 17:28

diederick76 wrote
btw is libdos2 by Arnold Metselaar which I found on MSX Banzai! fat16-compatible? Then I could try making something myself.

Libdos2 uses only high-level bdos calls to access files/directories and does not use any of the functions #14, #15 (FCB sequential read/write), #67 (format routine) and #68 (creation/destruction of RAMdisk). This means that the functions in libdos2 are fat16-compatible.
Libdos2 lacks a proper function to read a directory, you can use _glob(char * wild, char* fib), see glob.as in the sources, however this function does not find 'hidden' and 'system' directories and files.

Por diederick76

Expert (114)

Imagen del diederick76

04-04-2006, 17:39

Okay, that's good news. I'll take a look at it soon. (probably next weekend or so)

Por NYYRIKKI

Enlighted (5595)

Imagen del NYYRIKKI

04-04-2006, 21:54

You said, that you are using COMMAND.COM 2.41 This means, that your COMMAND.COM can run *.BTM files...

I just wrote stupid example script, that copies current directory and all sub-directorys to H: -drive. You can just copy/paste this to text file, edit the drivenames and execute it on your MSX.


gosub ~NewDir
end

~NewDir
set file = %@ffirst[*.*]%

~NextFile
set file = %_fnext%
if %@len[%file% ]% == 1 goto ~NoMoreFiles
set attr = %@fileattr[%file%]%
iff not %@instr[%attr%,D]% == 0 then
   iff not %file%==. and not %file%==.. then
   gosub ~Handler
   endiff
endiff

goto ~NextFile

~NoMoreFiles
return

~Handler
cd %file%
md h:%file%
cd h:%file%
echo Copying directory: %@full[.]%
copy *.* h:
gosub ~NewDir
set pfile = %@file[%@full[.]%]%
cd ..
cd h:..
set file = %@ffirst[*.*]%
~Prnts
set file = %_fnext%
if not %pfile%!== %file%! goto ~Prnts
return

Por NYYRIKKI

Enlighted (5595)

Imagen del NYYRIKKI

04-04-2006, 23:42

I don't know the details about IFF, PUSHD and POPD, to be honest it's the first time I heard about them. Are you sure they're standard DOS2 programs?

These are no programs, they are COMMAND.COM internal commands, that you can use. Help files were delivered with COMMAND.COM and can be obtained from delivery package, that is available trough HansO www-page.

Página 1/3
| 2 | 3