Welcome, Guest. Please login or register.

Author Topic: Setting file comments and protection bits on specific file extensions in entire directory tree?  (Read 2684 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SilvrDrgnTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1215
    • Show only replies by SilvrDrgn
    • http://mikerye.homeip.net
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!
Michael
 

Offline arnljot

If you have Magellan on Classic amiga, then you can do it by using a filter.
A posting a day keeps the sanity away...
http://www.arnljot.com
 

Offline JKD

  • Sr. Member
  • ****
  • Join Date: Aug 2002
  • Posts: 287
    • Show only replies by JKD
Look for the equivalent of the DOS 'for' command on AmiNET...
 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
I don't have Amiga DOS in front of me, but does the ALL switch work?  Something like:

FILENOTE #?.JPG "" ALL
Time to move on.  Bye Amiga.org.  :(
 

Offline LoadWB

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show only replies by LoadWB
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.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Code: [Select]
.> 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.
 

Offline SilvrDrgnTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1215
    • Show only replies by SilvrDrgn
    • http://mikerye.homeip.net
Will give all the suggestions a try.  Thanks!
Michael
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Well sure you can, but only mine does what you wanted :-)
 

Offline LoadWB

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show only replies by LoadWB
Quote

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: