fujidude Posted February 19, 2018 Share Posted February 19, 2018 At least it exactly behaves as described in the manual: The root in that example from Level42 is considered to be the specified directory from which the COM files, if any, will be copied. So it works. Please look up the examples in the manual on page 51. Nevertheless it would be nice to have such a tool at hand to fetch the desired file types from the structure of a drive. But I guess it will get difficult depending on the size of the drive, the directory tree (as the path is limited to 63 chars) and, last but not least, the number of files. For example see the capacities of the MENU command to understand. I did read the man page, and now the manual (which has the same wording) but did not interpret it to mean that usage was limited to the specific example given. The documentation prior to that states that a filespec of *.* is assumed unless unless one is provided. Nowhere does it say that use of the /R switch disallows a filespec other than *.* from being used. And as FJC pointed out, if a filespec is meant to be ignored when the /R is present, then you would expect it to act the same as not providing one and copy everything. But anyway, I thought I would bring it forth as Konrad had been asking for feedback. I would guess it's probably something he might want to address, but if not it might be helpful for the dox to clarify that /R is meant to be used on all files and directories and a user supplied one is excluded in that use case. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 19, 2018 Share Posted February 19, 2018 And as FJC pointed out, if a filespec is meant to be ignored when the /R is present, then you would expect it to act the same as not providing one and copy everything. On reflection, it appears to be the other way round: the presence of a file mask causes the /R switch to be completely ignored. 2 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 19, 2018 Share Posted February 19, 2018 On reflection, it appears to be the other way round: the presence of a file mask causes the /R switch to be completely ignored. Astute observation. I just ran into something else now. I can't load FDISK. I get an error loading FDISK0.OVL. Using the FDISK from the CAR: in the SDX 4.49C rev. Also, using Altirra 3.00 and doing so under WINE. Have CPU type set to 65C816 21MHz, but I tested with 6502/6502C 1.79MHz as well with same result. Quote Link to comment Share on other sites More sharing options...
+DrVenkman Posted February 19, 2018 Share Posted February 19, 2018 Astute observation. I just ran into something else now. I can't load FDISK. I get an error loading FDISK0.OVL. Using the FDISK from the CAR: in the SDX 4.49C rev. Also, using Altirra 3.00 and doing so under WINE. Have CPU type set to 65C816 21MHz, but I tested with 6502/6502C 1.79MHz as well with same result. Yes, I discovered this awhile back in another thread. The Hidden attribute has to be set for those .OVL files using the SDX Imager tool and then the rom reflashed to whatever you’re using (cart, U1MB, etc). Apparently this will be fixed going forward. 3 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 19, 2018 Share Posted February 19, 2018 Yes, I discovered this awhile back in another thread. The Hidden attribute has to be set for those .OVL files using the SDX Imager tool and then the rom reflashed to whatever you’re using (cart, U1MB, etc). Apparently this will be fixed going forward. Thanks for the info. I'll give it a try. Is there a SDX beta thread that I haven't found or something? Quote Link to comment Share on other sites More sharing options...
+DrVenkman Posted February 19, 2018 Share Posted February 19, 2018 Thanks for the info. I'll give it a try. Is there a SDX beta thread that I haven't found or something? No. I was trying to format a CF card for use in my 1088XEL with SDX4.49c beta when I discovered the issue. Jon told me what I needed to do to fix it. Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 19, 2018 Share Posted February 19, 2018 No. I was trying to format a CF card for use in my 1088XEL with SDX4.49c beta when I discovered the issue. Jon told me what I needed to do to fix it. I modified the OVL files to be hidden in the image and reflashed it to the U1MB. It works now. Thank you. 1 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 20, 2018 Share Posted February 20, 2018 Does anyone know of a way for a batch program to check for the presence of a particular driver? Specifically at the moment I'm interested in having a script check if ENV.SYS is engaged and proceed accordingly to the result. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 20, 2018 Share Posted February 20, 2018 I'm not aware of any method for detecting installed drivers, but you could define a couple of large environment variables which would exhaust the environment space if ENV.SYS is not present and use the "IF ERROR" conditional to check for an "Environment full" condition (which would denote that ENV.SYS was not loaded). 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 20, 2018 Share Posted February 20, 2018 I know in real dos SJC made a detection phase that listed out the system and could be used to make a config. I kind of like the this is what you have what to you want approach, but I would prefer it as a stand alone configurator.... turn on what you want, run it and make your choices save the config... then use it with a boot selector menu... turn on the Atari select a config, the batch run and swaps you partitions drives, drivers, etc etc etc... Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 20, 2018 Share Posted February 20, 2018 SDX allows selection of different configurations at boot time. Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 20, 2018 Share Posted February 20, 2018 I'm making a new batch file for use with 4.49C (listing follows), but as I go to test it I get an error 137 truncated record. The manual says this is basically a buffer overrun on CIO input, but that SDX does it differently. I can't figure out what could be wrong. echo on ; TKUPDATE.BAT ; Toolkit Update by FujiDude 2018-02-19 ; This script requires the use of ENV.SYS and the PHD.COM ; & PLD utilities to be in the syetm path. PROC info echo .This updater recursively goes through the source and echo .copies all .MAN .TXT .DOC files it finds to the MAN echo .directory of the target path. Likewise it does the echo .same for .SYS files but to the DRIVERS directory, and echo .finally .COM .EXE .XEX .BAT .OVL to the BIN directory. echo . echo . USAGE: -$_11$ TOOLKIT-SOURCE-PATH [TARGET PATH] echo . Source path is required, target path is optional echo . and will be current directory unless provided. echo . RETURN proc task copy *.sys $dp$>drivers copy *.com $dp$>bin copy *.exe $dp$>bin copy *.ovl $dp$>bin copy *.ini $dp$>bin copy *.bat $dp$>bat copy *.man $dp$>man copy *.txt $dp$>man copy *.doc $dp$>man for %a in -s *.arc /n ;ARC lets you combine these but the CL would be too long probably. arc x %a $dp$>drivers>*.sys arc x %a $dp$>bin>*.com arc x %a $dp$>bin>*.exe arc x %a $dp$>bin>*.xex arc x %a $dp$>bin>*.ovl arc x %a $dp$>bin>*.bat arc x %a $dp$>man>*.man arc x %a $dp$>man>*.txt arc x %a $dp$>man>*.doc next %a return proc walkdir gosub task if exists +s *.* for %d in +s *.* cd $%d gosub walkdir cd < next %d fi return ;Main program load command.com seterrno 0 echo . echo .SDX Toolkit Updater by FujiDude ver. 2018-02-19. echo .Requires the use of ENV.SYS and the PHD & PLD echo .utilities to be in the system path. echo . ; Is a source specified? if _11 if _11=="/H" OR _11=="-H" gosub info exit fi else gosub info exit 156 fi ;Does specified source exist? if exists +s $_11$ set sp=$_11$ else exit 150 fi ;Was a target specified? if _21 ;Does specified target exist? if exists $_21$ set dp=$_21$ else exit 150 fi else set dp=. fi phd chdir $sp$ echo .Processing... gosub walkdir echo . echo .Updated. echo . pld set sp set dp load Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 20, 2018 Share Posted February 20, 2018 It still sounds like one of the lines overflowed the input buffer after expansion. Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 20, 2018 Share Posted February 20, 2018 It still sounds like one of the lines overflowed the input buffer after expansion. Yeah it kind of does, but how/why I wonder. Looks like it should work to me anyway. Quote Link to comment Share on other sites More sharing options...
trub Posted February 21, 2018 Share Posted February 21, 2018 The maximum capacity of SDX command line buffer is 64 characters. It seems that you have exceeded this limit (especially shortening the comments may help). 2 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 21, 2018 Share Posted February 21, 2018 The maximum capacity of SDX command line buffer is 64 characters. It seems that you have exceeded this limit (especially shortening the comments may help). Thanks I'll take a look, but I didn't think comments were subject to the command line limit given that they are ignored. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 21, 2018 Share Posted February 21, 2018 They are in the count, they are skipped during process but not excluded from the buffer Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 21, 2018 Share Posted February 21, 2018 They are in the count, they are skipped during process but not excluded from the buffer Actually... here's what I verified through research & testing: A command line is limited to 64 characters (which I should have already known before I started). Comment lines in batch files are not limited to 64 characters. The issue I posted about was indeed a CL input of greater than 64 characters, but it was an actual operable command sequence which exceeded the limit; not a comment line. I somehow was under the fog that what I had written was within the acceptable limits even though there was at least one (non comment) CL which had exceeded it. Thank you guys for your feedback so far. It's always appreciated! 4 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 26, 2018 Share Posted February 26, 2018 (edited) Okay. So I put together a couple of scripts (.BAT files) that I wanted for my own use but which others might find useful too. The 1st one lets you specify a path where a tree of various files are and then copy them to a few key folders that would/should be put in your system path. See the table in the actual code for an example. echo off ; TKUPDATE.BAT ; Toolkit Update by FujiDude 2018-02-19 ; This script requires the use of ENV.SYS driver and the ; PHD & PLD utilities. PHD and PLD must be in the syetm path. proc info echo .This updater recursively goes through the source and echo .copies all files of certain types to the target path echo .as indicated in the following table: echo . echo . FOLDER : EXTENSIONS echo . --------:------------------------- echo . BIN : .COM .EXE .XEX .OVL .INI echo . SCRIPTS : .BAT echo . DRIVERS : .SYS echo . MAN : .MAN .TXT .DOC echo . echo .Also, ENV.SYS must be loaded and the toolkit PHD, PLD, echo .and CDD utilities need to be in the system path. echo . echo . USAGE: -%0 SOURCE_PATH TARGET_PATH echo . Both source & target path are required. echo . EXAMPLE .SYS files will go in TARGET_PATH>DRIVERS echo . return proc task echo . echo .Processing directory $%d$ ... if exists -s *. copy *.com %2>bin> fi if exists -s *.exe copy *.exe %2>bin> fi if exists -s *.xex copy *.xex %2>bin> fi if exists -s *.ovl copy *.ovl %2>bin> fi if exists -s *.ini copy *.ini %2>bin> fi if exists -s *.bat copy *.bat %2>scripts> fi if exists -s *.sys copy *.sys %2>drivers> fi if exists -s *.man copy *.man %2>man> fi if exists -s *.txt copy *.txt %2>man> fi if exists -s *.doc copy *.doc %2>man> fi for %f in -s *.arc /N ; ARC allowes combining these but CL might get too long? ; Expermient later to combine more to improve performance. arc e $%f$ %2>bin>*.com arc e $%f$ %2>bin>*.exe arc e $%f$ %2>bin>*.xex arc e $%f$ %2>bin>*.ovl arc e $%f$ %2>bin>*.ini arc e $%f$ %2>scripts>*.bat arc e $%f$ %2>drivers>*.sys arc e $%f$ %2>man>*.man arc e $%f$ %2>man>*.txt arc e $%f$ %2>man>*.doc next %f return proc walkdir gosub task for %d in +s *.* cd $%d$ gosub walkdir cd < next %d return ; Main program load command.com seterrno 0 set %d=%1 echo .SDX Toolkit Updater by FujiDude ver. 2018-02-25. echo . ; Is a source specified? if not _11 gosub info echo *** ERROR: missing source path exit fi ; Is a target specified? if not _21 gosub info echo *** ERROR: missing target path exit fi if not exists +s %2>bin mkdir %2>bin fi if not exists +s %2>scripts mkdir %2>scripts fi if not exists +s %2>drivers mkdir %2>drivers fi if not exists +s %2>man mkdir %2>man fi phd cdd %1 echo .Updating %2 from %1 ... gosub walkdir echo . echo .Updating complete. Don't forget to ensure the following echo .are in your PATH if they aren't already: echo . %2>bin echo . %2>scripts echo . %2>drivers echo . echo .and likewise for MANPATH: echo . %2>man echo . pld load And the 2nd one just does a recursive directory sort: echo off proc task echo . echo .Processing directory $%d$ ... sortdir . return proc walkdir gosub task for %d in +s *.* cd $%d$ gosub walkdir cd < next %d return ; Main program load command.com seterrno 0 echo .SDX Recursive SORTDIR by FujiDude ver. 2018-02-25. echo . set %d=%1 phd cdd %1 gosub walkdir pld load Edited February 26, 2018 by fujidude 1 Quote Link to comment Share on other sites More sharing options...
Roydea6 Posted February 27, 2018 Share Posted February 27, 2018 And the 2nd one just does a recursive directory sort: echo off proc task echo . echo .Processing directory $%d$ ... sortdir . return proc walkdir gosub task for %d in +s *.* cd $%d$ gosub walkdir cd < next %d return ; Main program load command.com seterrno 0 echo .SDX Recursive SORTDIR by FujiDude ver. 2018-02-25. echo . set %d=%1 phd cdd %1 gosub walkdir pld load I like the second one because I do a lot of directory sorts. But I modified this one to sort by switch /t so my Graphics and media files stay in my sort order.. And also the second on can be modified to do a recursive CHTD *.* of all folder in the partition.. 1 Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 27, 2018 Share Posted February 27, 2018 I like the second one because I do a lot of directory sorts. But I modified this one to sort by switch /t so my Graphics and media files stay in my sort order.. And also the second on can be modified to do a recursive CHTD *.* of all folder in the partition.. Of course they can be modified and I'm happy to hear that they are. I encourage it. That's what I had in mind back when I posted the RUNPACK.BAT and mentioned the "walkdir" (along with a task of course) procedure could be adapted to do any number of useful things. Long live SpartaDOS! Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 27, 2018 Share Posted February 27, 2018 Huston, I think we may have a bug. See the example code below. echo off ; Bug test of SDX 4.49c ; File for loop fails to ignore comment ; lines and attempts to execute them. for %f in -s *.* ; comment 1 ; comment 2 echo $%f$ next %f ; Now without comments for %f in -s *.* echo $%f$ next %f Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 27, 2018 Share Posted February 27, 2018 Perhaps the comment has to be at column 1? Quote Link to comment Share on other sites More sharing options...
fujidude Posted February 28, 2018 Share Posted February 28, 2018 Perhaps the comment has to be at column 1? Perhaps.. I would have to test it. But even so I would consider that somewhat in the insect realm because code indenting is generally supported otherwise. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted February 28, 2018 Share Posted February 28, 2018 (edited) The following batch file generates a "File not found" error, so I think we may conclude that white space ahead of the semicolon is disallowed: ; comment ; comment Page 115 of the manual says: A text line starting with a semicolon is understood as a comment and skipped without parsing Seems to work as per the description, although one could argue that the "skipped line" behaviour is inconsistent with the fact that comments may have leading space if placed after parsed commands. Edited February 28, 2018 by flashjazzcat 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.