+Larry #1 Posted August 19, 2015 Can SDX 4.47 SortDir reliably sort MyDos subdirectories? In my case, one level deep. Thought I'd ask before trying on images. Thanks, Larry Quote Share this post Link to post Share on other sites
drac030 #2 Posted August 19, 2015 (edited) Seems so. I just tried, i.e. used SORTDIR to sort a test directory containing 57 files on a MyDOS disk. Sorted fine, files are accessible and not messed, also inspected the dir under Eddy, shows no signs of damage. You can try that as long as the FS is the true MyDOS FS, i.e. CHKDSK /X shows "File system: MyDOS" for that disk. If it is said "AtariDOS", sorting is not possible (and SORTDIR will refuse to sort anyways). Edited August 19, 2015 by drac030 Quote Share this post Link to post Share on other sites
+Larry #3 Posted August 19, 2015 Thanks, Konrad! Could you explain the difference between AtariDOS and MyDos relative to SDX? I thought that SDX always interpreted MyDos disks as AtariDOS? In my particular case, I'm using 720K "Percom" images formatted from APE. -Larry Quote Share this post Link to post Share on other sites
drac030 #4 Posted August 19, 2015 (edited) Disks up to 1024 sectors are always "AtariDOS" ones: 1 sector VTOC, 10-bit file links, file number saved in the link. Because of that last thing, you cannot reorder the directory without updating the entire linkage of the files involved (and this is too much hassle). Disks bigger than 1024 sectors are "MyDOS" disks: >1 sector VTOC, 16-bit file links, no file number saved in the link. This can be sorted. Older SDX versions nevertheless allowed to sort AtariDOS disks. Such a disk later could not be accessed under AtariDOS: error 164 and bye. Fortunately, such a disk could get rescued by copying the contents onto another diskette under SDX. Edited August 19, 2015 by drac030 Quote Share this post Link to post Share on other sites
+CharlieChaplin #5 Posted August 19, 2015 (edited) Well, if you are a patient Atarian and still work with AtariDOS, MyDOS and diskettes... then there are two DIR sort programs by Tajemnicze Atari, namely Disksort and Filesort... tried them on a 90k and 130k DOS 2.0 / DOS 2.5 disk and they worked very well. Of course there are better and/or faster alternatives available. And there are filecopy / file-manager programs, like e.g. Prof. Copy 2.0 and others which can sort a DIR alphabetically - even on MyDOS disks (have not tried with subdirs though). Load Prof. Copy under MyDOS, then press "A" to sort Directory by filename or "S" to sort by extender - the sorting looks fast, but happens only on the screen. To get a sorted DIR on the diskette, you have to copy the files onto a new disk then (or copy to XRAM/Ramdisk first, then format the disk and copy from XRAM/Ramdisk back to diskette). Prof. Copy requires a min. of 128k RAM... There is also "Directory Re-Organizer" by Darryl Young which will most likely sort a DIR; I do have version 4.2 and version 5.6 in my collection, but since I do not have any docs, I never used them. Last not least there is Directory Wizard by Steffen Hoehne, available in several versions, think the older file-version was for DOS 2.0 and DOS 2.5, the newer (and commercial) version had two disksides, one for Turbo-DOS and BiboDOS disks up to 360k and another diskside for MyDOS (up to 16MB and subdirs). This program has various functions, one can use it to trace a file (show start and end sectors on the disk), put text-remarks into the directory (usually with a length of 000 sectors in the DIR), sort a DIR or subdir (subdir=MyDOS version only) and other things. Think the older fileversion supported only Speedy 1050 drives, whereas the newer commercial version supported Speedy and Happy drives. But errm, I only kept the older fileversion and sold the newer version approx. 20 years ago... SortDIR.zip Pcopy20.zip DIRREORG.zip Edited August 19, 2015 by CharlieChaplin Quote Share this post Link to post Share on other sites
+Larry #6 Posted August 19, 2015 Thanks. But let me ask this a different way. Can SDX access *inside* MyDos subdirectories? I don't want to sort the subdirectory names in the root directory -- I want to sort the contents (files) of the subdirectories themselves. So far, I have been unable to get SDX 4.47 to do anything with the MyDos subdirectories. I can sort files on a MyDos disk, and I can sort the subdirectory names, but can't access the contents of the subdirectories. I can't CHDIR to a valid MyDos subdirectory. It's been a long time, but I seem to remember having this issue in the past when using MyDup. Note: I just saw on p40 of the 4.47 user guide that SDX can't access MyDos subdirectories, so that presumably has not changed and therefore, I can't sort the files within the MyDos subdirectories. I suspect there is a way around this -- copying the contents of the subdirectories to a blank root directory, sorting them, and then copying back to a blank subdirectory. I have a lot of disks with MyDos subs. to sort, so I think I'll look for a better way. -Larry Quote Share this post Link to post Share on other sites
drac030 #7 Posted August 19, 2015 (edited) @Larry: you cannot change current directory to an arbitrary directory on a MyDOS disk under SDX, indeed. But that does not mean that you cannot *access* a subdirectory on a MyDOS disk. Let us say that the directory you want to sort is D1:TESTDIR. As said above, CD TESTDIR will not set this dir as current, that is true. Nevertheless, staying in the root directory of that disk, you still can do this: SORTDIR TESTDIR> You can do that as well as e.g. DIR TESTDIR> to get that directory's listing. Edited August 19, 2015 by drac030 Quote Share this post Link to post Share on other sites
drac030 #8 Posted August 19, 2015 Tajemnicze Atari I can see that you are writing this name this way rather consequently, so let me make a correction: this was not "Tajemnicze Atari" (= A mysterious Atari), but "Tajemnice Atari" (= The mysteries of Atari). No "z". Quote Share this post Link to post Share on other sites
+Roydea6 #9 Posted August 20, 2015 (edited) Larry, With SDX447 mount ATR as D1: then D1: so your are in the root. then DIRS *. >>MYBAT.BAT. this gives you a batch file on the root of D1: then ED MYBAT.BAT to edit the batch file. when in the editor CONTROL+Z will move the cursor to end of line DEL backspace to erase back to the DIR FILENAME and place a greater than sign there '>' add a space after the > and add /T for sort by type this will group all the extenders together. in descending order then use CONTROL + A to return to cursor position 1 then type SORTDIR and get rid of the COLON::::: /S for sort by size /N for sort by name /T for sort by type /X for sort by reverse order. /D is invalid for MyDos as this is sort by Date. Save the file and exit back to command prompt and run the batch file -mybat don't forget the minus sign then the file name. Edited August 20, 2015 by rdea6 Quote Share this post Link to post Share on other sites
+Larry #10 Posted August 20, 2015 Hi Guys- @Drac030 -- Yes! That works great. One thing that I was missing was the ">" operator. But I do have a question about CHDIR from page 40: "This command has no effect on MyDos disks..." I don't understand why not being able to detect a disk change should cause subdirectories not to be fully supported? In case there was a disk change, couldn't it be be detected by the normal "file not found?" I'm probably missing something here, but it seems that if SDX can support part of the usage of MyDos subs, it could/should do the whole thing. (?) One issue that I noticed is that after I sorted a subdirectory, SDX leaves a bunch of "bogus" file entries, up to the full 64 file limit. (pic attached) Presumably left over as part of the file sorting process. If it is truly is a bug, I'll send in a report. Note: the extra files do not show up when using SDX. But when you look at the disk with MyDos, they are there. @Rdea6 -- That is really clever! I'll definitely use that. And thanks for the complete explanation of it. This will automate my process quite a bit and really speed up the job. @CharlieChaplin -- I'll check these out -- Thanks! The commercial version of Prof... sounds very interesting. I'll keep a lookout for it. -Larry Quote Share this post Link to post Share on other sites
flashjazzcat #11 Posted August 20, 2015 But I do have a question about CHDIR from page 40: "This command has no effect on MyDos disks..." I don't understand why not being able to detect a disk change should cause subdirectories not to be fully supported? In case there was a disk change, couldn't it be be detected by the normal "file not found?" I'm probably missing something here, but it seems that if SDX can support part of the usage of MyDos subs, it could/should do the whole thing. (?) I don't think MyDOS itself even does the "whole thing" with subdirectories. If you use "Pick Directory" on the MyDOS menu to switch to "D1:FOO>", listing "D1:*.*" still lists the content of the root directory. "D:", meanwhile, without the drive number, seems to act like a shorthand for the current drive/directory (like the default working drive in SDX). As soon as you inject a drive ID into that filespec again, you're back in the root directory. This makes it enormously difficult to construct a file selector which works with MyDOS, since when the user switches drives they always get the root directory of the specified drive. Quote Share this post Link to post Share on other sites
drac030 #12 Posted August 20, 2015 (edited) Larry, I cannot reproduce the "bogus entries" here. Could you send me an example image with this effect (or better two ones: "before" and "after"). You are sure you are using SDX 4.47 and its CAR:SORTDIR.COM? (I am asking, because a similar effect was in SDX 4.46 - there was a bug in the ATARIDOS.SYS driver which used to cause that, but it should be fixed already). There are multiple issues with handling MyDOS subdirectories. Technically, there is no difficulty in changing the current directory to any MyDOS subdirectory. But, having that done: 1) how do we find out what is the full path leading to that directory? 2) how do we find out at what level (how deep) we are? In other words: there is no difficulty in doing CD SUBDIR, but later there is a problem in going back, or one level up (or arbitrary number of levels up). In SDX or FAT or CP/M this problem does not exist, because SDX and FAT subdirectories contain pointers pointing to the level up there, and CP/M does not have hierarchical subdirectories In MyDOS a newly created directory is completely empty: no nothing there. This of course can be solved by keeping the path in the memory. But note that SDX can set the current directory _separately_ for each drive. There are 15 drives, so this means that the driver has to remember 15 paths. 15 paths * 64 characters per path = nearly 1k (960 bytes). Next, let us say we have the CD SUBDIR done and the current directory is the SUBDIR now. Now you remove the diskette, insert another, which has no subdirs. You do dir and ... garbage, probably, because the DOS has no simple method of detecting that the disk has changed (SDX in such a case resets the current path to the root dir of the drive). When there is just one level of subdirectories, scanning the entire VTOC and the root dir could probably allow to detect disk change (i.e. each disk access would have to start with reading 2k directory + up to 8k VTOC, khm...). But with more levels, it would be probably unreliable anyways: there could always be a disk with identical VTOC and identical root directory, but with different contents at the deeper levels (like: everything the same, just somewhere there is a 2k file instead of what on the other disk is yet another subdirectory)... Edited August 20, 2015 by drac030 Quote Share this post Link to post Share on other sites
+Larry #13 Posted August 20, 2015 The bogus file entries may have been from 4.46. I'll check, and also see if sort directory shows a different number from 4.46 to 4.47. I normally use the flash cart 4.47, and my U1MB still has 4.46. I need to update that, and in fact d/l the new U1MB version yesterday. I did check before and after on a second sub with the same results. Larry Quote Share this post Link to post Share on other sites
+Larry #14 Posted August 20, 2015 Hi Konrad- The extra files were added in 4.46. In 4.46, SORTDIR is V1.7. No problem with 4.47, and as best I can see, there is no version number shown for the SORTDIR in 4.47. And got the (overdue) 4.47 updated to my U1MB. Thanks for all the help! -Larry Quote Share this post Link to post Share on other sites
drac030 #15 Posted August 20, 2015 Good, thanks The SORTDIR.COM revision makes no difference here, the thing what matters is the ATARIDOS.SYS revision (the driver which is responsible for access to AtariDOS diskettes). Quote Share this post Link to post Share on other sites
+Larry #16 Posted August 20, 2015 I don't think MyDOS itself even does the "whole thing" with subdirectories. If you use "Pick Directory" on the MyDOS menu to switch to "D1:FOO>", listing "D1:*.*" still lists the content of the root directory. "D:", meanwhile, without the drive number, seems to act like a shorthand for the current drive/directory (like the default working drive in SDX). As soon as you inject a drive ID into that filespec again, you're back in the root directory. This makes it enormously difficult to construct a file selector which works with MyDOS, since when the user switches drives they always get the root directory of the specified drive. Yes. I guess I'm just used to how MyDos works after all these (nearly 30) years -- used to it's foibles. But if I want to use :FUBAR :-), then I just pick, it and I'm there. It does help a bit that the subs can be navigated by XIO in programs. -Larry Quote Share this post Link to post Share on other sites
flashjazzcat #17 Posted August 20, 2015 I used MyDOS for a year or so before I purchased SpartaDOS X around 1990, and even after that I used it to run the AMAC Assembler since the assembler would hang on the second pass under SDX (still not sure if that still happens). To permanently sever ties with MyDOS, I took the brute-force approach of writing my own disk to disk assembler. Certainly, it's better not to try and apply common preconceptions about the way one would expect subdirectories to work when using MyDOS. It is what it is. 2 Quote Share this post Link to post Share on other sites