Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: SilvrDrgn on July 15, 2008, 04:23:32 PM
-
I need to set or remove file comments (filenote command) and protection bits (protect command) on specific files in an entire directory tree structure. For example, I want to remove file comments and the "E" protection bit from all *.jpg files in a certain directory and all of the subdirectories below it. I have tried various command syntaxes, but have been unsuccessful so far. How do I go about doing what I need easily? TIA!
-
If you have Magellan on Classic amiga, then you can do it by using a filter.
-
Look for the equivalent of the DOS 'for' command on AmiNET...
-
I don't have Amiga DOS in front of me, but does the ALL switch work? Something like:
FILENOTE #?.JPG "" ALL
-
If not, you can create a script using LIST and LFORMAT, then EXEC it. There's a way to do it with pipe, like in Unix, though off the top of my head I cannot recall the syntax. I believe it's something like
list #?.JPG LFORMAT "protect %s -e" | exec
I asked a question about pipes a while back and I believe Piru answered spot-on.
-
.> list some:path all pat #?.jpg lformat "protect *"%s%s*" -e*Nfilenote *"%s%s*"" to t:script
.> execute t:script
Obviously you can use a pipe aswell, but this temp scriptfile method works without, too.
-
Will give all the suggestions a try. Thanks!
-
Well sure you can, but only mine does what you wanted :-)
-
Piru wrote:
Well sure you can, but only mine does what you wanted :-)
:-P It's true, though. I missed part of the original question. :bow: