fat16 en xcopy

Página 2/3
1 | | 3

Por konamiman

Paragon (1157)

Imagen del konamiman

05-04-2006, 09:08

I doubt XCOPY and MultiMente use anything but standard DOS function calls, so the problem must be on the FAT16 driver itself. Pity that Okei doesn't make public all the information she has about DOS 2 internals, so other people could help her in maintaining the driver.

Por diederick76

Expert (114)

Imagen del diederick76

05-04-2006, 11:14

I doubt XCOPY and MultiMente use anything but standard DOS function calls

Why do you think that? I don't have any problem using copy (at least not yet), but my problems with xcopy and multi mente are 100% reproducable. This would indicate different mechanisms, wouldn't it?

As for Okei's driver, since it has version number 0.11, I never expected to not run into any problems at all. I am just fed up with switching partitions all the time (its slow and inconvenient), and most of my games collection seem to run fine from fat16 when they don't have a problem with DOS2 and IDE in the first place.

Por diederick76

Expert (114)

Imagen del diederick76

05-04-2006, 11:16

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.

(...)

That's great! I didn't know we had a real scripting language on MSX! Your script is very helpful (both in its function and as an example). I didn't find the docs you refer to yet, but I'm definitely checking this out.Big smile

Por diederick76

Expert (114)

Imagen del diederick76

05-04-2006, 13:00

The docs and other files can be downloaded from here, btw:

www.funet.fi/pub/msx/mirrors/msx2.com/sources/command241.zip

Por NYYRIKKI

Enlighted (5889)

Imagen del NYYRIKKI

05-04-2006, 19:59

Yesterday, I was in a hurry, so the example was not very good... Sorry about that.

Here is a better example, that copies also the first directory. Smile

rem COPYTHIS.BTM 
rem This BTM patch example copies current directory and subdirs to destination drive
rem Example: COPYTHIS H:

gosub ~SeekDir
echo Copying directory: %@full[.]% (This is last one)
copy *.* %1
set file=
set pfile=
end

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

~NextFile
if %@len[%file% ]% == 1 return
if not %@instr[%@fileattr[%file%]%,D]% == 0 if not %file%==. if not %file%==.. gosub ~Handler
set file = %_fnext%
goto ~NextFile

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

Most of these commands are working directly from command line and also with normal BAT files, but at least GOTO, GOSUB and IFF commands require the file to be renamed to BTM.

If you are familiar with PC's 4DOS or 4NT command shell, using COMMAND.COM extended features should be easy. I anyway warn you already, that behavior of IF/IFF and usage of " " and "%" may drive you mad in no time... It sometimes just don't make any sense. Smile

Por diederick76

Expert (114)

Imagen del diederick76

08-04-2006, 13:44

Thanks for the script, but when I try to execute it, I get a

*** Batch file error: command too long
Terminate batch file (Y/N/)?

however, the longest line (17) is 93 characters long, and according to www.mccw.hetlab.tk/93/dos240/en.html#Par15 command lines can be up to127 characters in length.

How come?

Por Manuel

Ascended (18246)

Imagen del Manuel

08-04-2006, 19:46

diederick: are you sure you use DOS end-of-line markers? And not UNIX?

Por NYYRIKKI

Enlighted (5889)

Imagen del NYYRIKKI

08-04-2006, 20:43

Yes, I agree, that this is most propably the problem. Try: TYPE COPYTHIS.BTM and check that it looks same as in this page.

Por diederick76

Expert (114)

Imagen del diederick76

09-04-2006, 21:56

diederick: are you sure you use DOS end-of-line markers? And not UNIX?

That must be it. I always forget about those. Thanks.

After I split the second line of the above script in two it would run (even though that wasn't the longest line) but trying to copy a directory structure with it would make it get stuck in an endless loop trying to copy the same directory over and over again.

I have no experience with 4DOS (I don't even know what it is) but I have reasonal experience with bash scripting, sometimes with embedded sed statements in them, so I know how frustrating things can become when a correct syntax looks more like something that has been SHA encrypted Tongue

Anyway, I was playing with BTM scripting, but found that it displays inconsistent behaviour. Sometimes a statement like

gosub ~label

makes the script stop after
*** Too many parameters.

The exact same script would then run fine after the computer had been rebooted. Any idea why this is?

Por NYYRIKKI

Enlighted (5889)

Imagen del NYYRIKKI

10-04-2006, 00:26

I have no experience with 4DOS (I don't even know what it is)
Well... let's just say, that these BTM files should run on 4DOS environment as well. This was a command.com replacement for MS-DOS users, that was very popular mostly because it added tab-functionality and custom colors to DIR command. Today there is also 4NT for Windows users, that can be used to replace CMD.EXE and 4OS2 for OS2 users.

Look here for more info: www.4dos.info/

About the problem... Yes, I've seen this error happening as well. I think it has something to do with gosubs, that don't return. I warn you again, this has some 'features' that may surprice you :)

Usually typing EXIT is enough to get things back on track.

Página 2/3
1 | | 3