Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: marcfrick2112 on April 26, 2011, 09:16:11 PM
-
Hey everyone, First , sorry I have been MIA for some time, it's been a rough year for me.
OK, I know one of the UK Amiga magazines posed something like this as a question for readers:
How would I, for example, Delete every icon in a directory , including in all sub-directories?
I know ' DELETE #?.info will delete all icons in that dir...
And why do I need this? Cuz I have a few CD's of MODS and .midi files that were made 'idiot-proof' and all have little scripts and icons... all I want are the &*#^@*%?! .mid and .mod files!
Help me, Amiga sages...
:afro:
-
Firstly, make sure you're either in the directory you want to delete all .infos recursively from (current directory), or add the path before your #?.info. For example, the command "delete dh2:mods/#?.info all". This will delete all .info files in every nested subdirectory within the "dh2:mods" directory. If any of them have the "d" protection bit missing, they won't be deleted, and it will report so. In this case, use "delete dh2:mods/#?.info all force".
-
Mizar, Thanks for trying, but.... That command works for the main DIR but doesn't recurse into sub-directories.. I thought it had something to do with an odd usage of the LIST command....
Help me Obi-wan Kenobi, you're my only hope,,'
:laughing:
*sigh*
-
I think you can do:
delete dh2:mods/#?/#?.info all
Edit: Nope. Just did some testing. This will only delete the .info files in all subdirectories but not the ones in the subdirectories of those subdirectories. You might be right about needing to use LIST along with the LFORMAT option.
-
Mizar, Thanks for trying, but.... That command works for the main DIR but doesn't recurse into sub-directories.. I thought it had something to do with an odd usage of the LIST command....
Help me Obi-wan Kenobi, you're my only hope,,'
:laughing:
*sigh*
Oh, you're right. That command doesn't work very well. Yes, you have to use LIST LFORMAT to create a short script. This will work, try this:
list dh2:mods all sub .info lformat "delete %p%n" >ram:delinf
(where dh2:mods again is your directory where you want to delete the .info files.)
Then "execute ram:delinf". Just look and make sure the full path in the script file (ram:delinf) is correct before you delete the wrong directory.
-
Hey everyone, First , sorry I have been MIA for some time, it's been a rough year for me.
OK, I know one of the UK Amiga magazines posed something like this as a question for readers:
How would I, for example, Delete every icon in a directory , including in all sub-directories?
I know ' DELETE #?.info will delete all icons in that dir...
And why do I need this? Cuz I have a few CD's of MODS and .midi files that were made 'idiot-proof' and all have little scripts and icons... all I want are the &*#^@*%?! .mid and .mod files!
Help me, Amiga sages...
:afro:
list >ram:script all files p=#?.info lformat="delete *"%p%n*""
execute ram:script