View Single Post
Old 08-28-2007   #1 (permalink)
powersheller


 
 

get-child item question from a newbie

Ok, this is my first day working with powershell. I'm sure this
question couldn't be easier, but I can't seem to figure it out.

All I want to do is run a script which would accomplish the following.

run a command in each sub directory

here is what I would do at a command line.
c:\somedir> cd\subdir
c:\somedir\subdir>
c:\somedir\subdir>somecommand.exe
c:\somedir\subdir>cd..
c:\somedir\>cd\subdir2
c:\somedir\subdir2>somecommand.exe

etc. it's probably very easy, but I can't figure out how to pass the
get-child item result to set-location


any suggestions would be greatly appreciated.

ej

My System SpecsSystem Spec