Poster | Thread |
AlexC
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 17-Feb-2011 4:13:13
| | [ #21 ] |
|
|
![](https://amigaworld.net/images/avatar/users/2262.jpg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @Mrodfr
I'm not sure why it wouldn't find the List command, as the commands executed by For run in the same process and thus would inherit the same command path.
As for List showing files too, I found that List is a bit picky about the order of the arguments.
The following syntax should work for sure though:
For #? type=dir do Echo %s, C:List dir="%s" dirs quick nohead, Echo ""
(the second Echo command inserts a newline, making it more readable) _________________ AlexC's free OS4 software collection
![](https://amigaworld.net/images/smilies/icon_geek.gif) AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
Deniil715
![](https://amigaworld.net/images/supportertags/gold.gif) | ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 17-Feb-2011 8:40:03
| | [ #22 ] |
|
|
![](https://amigaworld.net/images/avatar/users/932.jpg) |
Elite Member ![](https://amigaworld.net/images/ranks/5blocks.gif) |
Joined: 14-May-2003 Posts: 4237
From: Sweden | | |
|
| @Mrodfr
Quote:
I have followed your explanations and, on the quoted part, I have stopped because the remaining time is 8 mins with 100% CPU. I need a tool who do the thing in some seconds . Thank for the help. |
WHAT??!? ![](https://amigaworld.net/images/smilies/icon_smile.gif) Then you got to have 100000 files or something else is wrong. 100% CPU is normal for any program that is performing a task. But 8 minutes??
Only when I apply a plugin to 5000 files it would possibly take this long. The File Comment tool only work on strings and should normally do 1000 files/second on a 060 at least.
I'll have to do some tests...._________________ - Don't get fooled by my avatar, I'm not like that (anymore, mostly... maybe only sometimes) ![](https://amigaworld.net/images/smilies/icon_smile.gif) > Amiga Classic and OS4 developer for OnyxSoft. |
|
Status: Offline |
|
|
Mrodfr
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 17-Feb-2011 17:30:39
| | [ #23 ] |
|
|
![](https://amigaworld.net/images/avatar/users/6058.jpeg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 28-Jan-2007 Posts: 1396
From: French | | |
|
| @Severin
Quote:
try "bx dirscan.bas DONNEES:dst >ram:text" I put in an untested check for a trailing slash. another thing that might mess it up is if you have [ or ] in the drawer names. |
bx dirscan.bas DONNEES:dst >ram:text
result:
Basic load error 5 (inside the text file- 19 bytes size).
@Alexc
Quote:
For #? type=dir do Echo %s, C:List dir="%s" dirs quick nohead, Echo ""
|
This is exactly the result I search! A reverse alphabetically order at the beginning of the file and randow order at the end.
BTW, For seemed to be powerfull (I have seen lots of settings on the help command line and make this tool hard to discover).
Just miss an double order A to Z feature for main and sub-drawer nd a saveto file.
Surely the For tool came from somewhere... (for a doc).
@Deniil715
112 drawers. 1014 files in total.
Last edited by Mrodfr on 17-Feb-2011 at 05:45 PM. Last edited by Mrodfr on 17-Feb-2011 at 05:44 PM. Last edited by Mrodfr on 17-Feb-2011 at 05:43 PM. Last edited by Mrodfr on 17-Feb-2011 at 05:43 PM. Last edited by Mrodfr on 17-Feb-2011 at 05:37 PM.
_________________ BTW, what you have done for the amiga today ????
-A1200+Mediator+VooDoo3+060/50+96mo+SCSI-KIT -SAM440EP-667mhz-on MapowerKC3000+AOS4.1
Amiga Docs Disks Preservation Project |
|
Status: Offline |
|
|
AlexC
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 18-Feb-2011 10:45:18
| | [ #24 ] |
|
|
![](https://amigaworld.net/images/avatar/users/2262.jpg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @Mrodfr
The documentation for "For" is in the Help/English drawer of the BrowserII archive. It's not too detailed but it covers all the arguments.
For gets the list of file from DOS in the same order as DOS returns them to the List command (typically most recently copied file on top) and doesn't have a built-in sorting function so unless you want to add that to the For.c source and recompile it the alternative is to supply a sorted list on the fly to "For", so for example instead of:
For #? type=dir do Echo %s, C:List dir="%s" dirs quick nohead, Echo ""
you could use:
For `C:List #? dirs sort=name lformat="*"%s*""` do Echo %s, C:List dir="%s" dirs sort=name quick nohead, Echo ""
and it would produce a list sorted both at the 1st and 2nd level.
Now if you want that list to go to a file instead, as "For" doesn't offer that feature either, just add a redirection to a file after "For" like:
For > RAM:MyRoms `C:List #? dirs sort=name lformat="*"%s*""` do Echo %s, C:List dir="%s" dirs sort=name quick nohead, Echo ""
It's not exactly as convenient as a simple 'Dir ALL DIRS DEPTH=2 SORTED TO RAM:MyRoms' but it works ![](https://amigaworld.net/images/smilies/icon_smile.gif) _________________ AlexC's free OS4 software collection
![](https://amigaworld.net/images/smilies/icon_geek.gif) AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
AmigaOneProductions
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 18-Feb-2011 14:06:59
| | [ #25 ] |
|
|
![](https://amigaworld.net/images/avatar/users/5273.jpg) |
Cult Member ![](https://amigaworld.net/images/ranks/3blocks.gif) |
Joined: 11-Jan-2006 Posts: 717
From: Ingle land | | |
|
| @Mrodfr
Quote:
That's just becase you have not got the dirscan.bas in the directory you are in, eiither do a bx path:dirscan.bas, or copy it to the directory you are working in
_________________ Glass coffins, a success? Remains to be seen. |
|
Status: Offline |
|
|
Mrodfr
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 18-Feb-2011 17:08:42
| | [ #26 ] |
|
|
![](https://amigaworld.net/images/avatar/users/6058.jpeg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 28-Jan-2007 Posts: 1396
From: French | | |
|
| @AmigaOneProductions
Effectively, you are right. dirscan.bas must be copied on the place the list must be created.
It's just not noted on the small readme with the archive.
The list result is also what I need. The creation of the list need some seconds to be done completely.
Last edited by Mrodfr on 18-Feb-2011 at 05:09 PM.
_________________ BTW, what you have done for the amiga today ????
-A1200+Mediator+VooDoo3+060/50+96mo+SCSI-KIT -SAM440EP-667mhz-on MapowerKC3000+AOS4.1
Amiga Docs Disks Preservation Project |
|
Status: Offline |
|
|
Snuffy
![](https://amigaworld.net/images/supportertags/bronze.gif) | ![](https://amigaworld.net/images/subject/icon32.gif) |
Re: Txt file of dir drawers. How ? Posted on 18-Feb-2011 23:39:58
| | [ #27 ] |
|
|
![](https://amigaworld.net/images/avatar/229.gif) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 25-Oct-2005 Posts: 1121
From: Michigan, USA | | |
|
| Hi @ thread
Tsk, tsk, I'm a bit shocked at the limited solution to Mrodfr's problem. Does anyone 'really use' their Amiga for stuff? The command word is in ABCshell or more specifically in CoreUtils 6.10 called ' ls -R '. Thanks Henning for this powerful shell. BTW for those who don't read much, Henning Nielsen Lund, is developer & maintainer of the Amiga ABCshell. There is about 50 options to set this command any way you like. Snuffy hugs hnl_dk@amigaos.dk foe such Amiga wonders! BTW Mrodfr, 'color=always' will list list in colors! Tsk,tsk,tsk... _________________
|
|
Status: Offline |
|
|
AlexC
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 19-Feb-2011 0:42:12
| | [ #28 ] |
|
|
![](https://amigaworld.net/images/avatar/users/2262.jpg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @Snuffy
Tsk, tsk, back at you ![](https://amigaworld.net/images/smilies/icon_smile.gif)
We provided modfr with some working solutions without resorting to the use of "foreign" commands from the posix world, so you should be bowing in awe rather than tsk'ing in disbelief ![](https://amigaworld.net/images/smilies/icon_wink.gif)
If you think that 'ls' can do the trick, could you provide a command line example which will produce the listing exactly as modfr desires? I don't think it's possible with 'ls' alone.
_________________ AlexC's free OS4 software collection
![](https://amigaworld.net/images/smilies/icon_geek.gif) AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
Snuffy
![](https://amigaworld.net/images/supportertags/bronze.gif) | ![](https://amigaworld.net/images/subject/icon32.gif) |
Re: Txt file of dir drawers. How ? Posted on 19-Feb-2011 21:48:31
| | [ #29 ] |
|
|
![](https://amigaworld.net/images/avatar/229.gif) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 25-Oct-2005 Posts: 1121
From: Michigan, USA | | |
|
| @AlexC
Tsk, tsk, back at you I love boomerangs!
We... without resorting to the use of "foreign" commands from the posix world... Hmm, you sound like you have some prejudices like the people over at Morphzone? I thank God for developers like HNL for ABC-Shell and Edgar Schwan for CygniX11, and Amiga OS4.0 for Python. ...so you should be bowing in awe rather than tsk'ing in disbelief. I bow to 'AWK' for text processing and search tasks with 'GREP' and still tsk, tsk, about how anyone gets along without these seriously powerful programs. Oh, BTW, for historical records keeping my AmigaONE came shipped in April 2003 with Debian Linux. I had to wait to July 2004 for the Amiga OS 4.0 pre-release. Please no lectures about the 'Posix' world; you don't qualify. _________________
|
|
Status: Offline |
|
|
AlexC
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 20-Feb-2011 1:33:27
| | [ #30 ] |
|
|
![](https://amigaworld.net/images/avatar/users/2262.jpg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @Snuffy
Quote:
Please no lectures about the 'Posix' world; you don't qualify. |
That's a bold assumption ![](https://amigaworld.net/images/smilies/icon_eek.gif)
Anyway, I'm not saying that we should never use anything which originated from the posix world, as we wouldn't have GCC nor a TCP stack for instance, but I prefer to do as much as I can using original Amiga software and use ports when it just wouldn't make sense to write a new application for the task at hand.
I'd rather be able to do everything on the same machine even if it means having to use a few ports like OWB and Blender in my case, than having to keep a Linux box running on the side all the time.
What I don't want to see happen is a systematic reliance on Linux apps and tools to the point where there's nobody left writing native applications because at that rate we might as well just switch to Linux and save ourselves a lot of time and trouble.
[edit] Oh and by the way, how's that 'ls' example coming along? ![](https://amigaworld.net/images/smilies/icon_biggrin.gif) [/edit]Last edited by AlexC on 20-Feb-2011 at 01:37 AM.
_________________ AlexC's free OS4 software collection
![](https://amigaworld.net/images/smilies/icon_geek.gif) AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
Snuffy
![](https://amigaworld.net/images/supportertags/bronze.gif) | ![](https://amigaworld.net/images/subject/icon32.gif) |
Re: Txt file of dir drawers. How ? Posted on 21-Feb-2011 0:42:16
| | [ #31 ] |
|
|
![](https://amigaworld.net/images/avatar/229.gif) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 25-Oct-2005 Posts: 1121
From: Michigan, USA | | |
|
| @AlexC
Oh and by the way, how's that 'ls' example coming along?
New shell process :> sh :> ls --help :> ls -R
...but I prefer to do as much as I can using original Amiga software... This is OK, but please consider how old AmigaDos and how far behind the times it is. When IEEE proposed the shell language specifications 'IX', no particular platform was targeted. I wish more people would see ABC-Shell as an update to shell processing and nothing to do with linux or unix intruding into the system.
What I don't want to see happen is a systematic reliance on Linux apps and tools to the point where there's nobody left writing native applications because at that rate we might as well just switch to Linux and save ourselves a lot of time and trouble.
None of the vocabulary of CoreUtils 6.10 are linux or unix in origin. It's all a IEEE spec! How old is ADos shell language? Isn't it a hang-over of BCPL which is about 40 years or more old now!
_________________
|
|
Status: Offline |
|
|
Mrodfr
| ![](https://amigaworld.net/images/icons/posticon.gif) |
Re: Txt file of dir drawers. How ? Posted on 17-Mar-2011 17:45:47
| | [ #32 ] |
|
|
![](https://amigaworld.net/images/avatar/users/6058.jpeg) |
Super Member ![](https://amigaworld.net/images/ranks/4blocks.gif) |
Joined: 28-Jan-2007 Posts: 1396
From: French | | |
|
| @AlexC
Quote:
For > RAM:MyRoms `C:List #? dirs sort=name lformat="*"%s*""` do Echo %s, C:List dir="%s" dirs sort=name quick nohead, Echo "" |
This is really a good command that fullfill all my needs and honeslty this for command should be added on AOS4 (source are available).
Alexc
Can I ask you if you could make for me the same command listed on the quote but for a menu or button for Dopus4 ?
something like:
Use a dopus button, who open a requester for choosing the directory for the list creation and the command create the file result.
Maybe ask a destination for the created file also.
Thanks alot if you could found the time for that ;*-)_________________ BTW, what you have done for the amiga today ????
-A1200+Mediator+VooDoo3+060/50+96mo+SCSI-KIT -SAM440EP-667mhz-on MapowerKC3000+AOS4.1
Amiga Docs Disks Preservation Project |
|
Status: Offline |
|
|