Welcome, Guest. Please login or register.

Author Topic: Looping through all directories of a partition?  (Read 3079 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4051
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show all replies
Re: Looping through all directories of a partition?
« on: October 13, 2009, 11:59:13 AM »
is this connected to changing icons ?
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4051
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show all replies
Re: Looping through all directories of a partition?
« Reply #1 on: October 13, 2009, 01:15:19 PM »
Will the cli program allow you to use wildcards ?
 
So you could use #?.info for instance.
 
I am not sure how you would loop through all the directories to do this though.  I suspect you would need to supply a definite list
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4051
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show all replies
Re: Looping through all directories of a partition?
« Reply #2 on: October 13, 2009, 01:29:58 PM »
Quote from: Thomas;525790
If it does not allow wildcards, you can use the List command to call the program for each file:
 
Code: [Select]
list >ram:scriptfile work:dirname all files p=#?.info lformat="changeicon *"%p%m*" xyz"
execute ram:scriptfile

 
I was going to suggest something using pipes but wasnt sure how you would then call the program for each one.
 
Good to learn some of this stuff.
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"