On Aug 29, 11:00 am, Marco Shaw <marco.shaw@_NO_SPAM_gmail.com> wrote:
Quote:
Quote:
> > First of all, I want to thank everyone that has offered suggestions.
> > I'm still a bit stumped on this.
> > as far as I can tell the solutions don't address the fact that I just
> > want to step one level deep from the current dir and run a specific
> > command (in this case it's actually a script that must be run from
> > current dir, I can't just run it from a different dir with the correct
> > path.) and then I need to go back up one dir and then back down into
> > the next dir and run the same command.
> > I don't think I need -recurse because I don't want to go deeper than
> > the one level.
> > I know this is probably really easy, I just don't see it. I'm spinning
> > my wheels here on something I know shouldn't take more than a minute
> > or two.
>
> You *specifically* need to 'cd ..', and 'cd new_dir'? May we ask why?
> The solutions put you *in* the dir, but might not cd in and out.
>
> You don't need -recurse like you mentioned.
>
> This is the learning curve... Enjoy the ride!
>
> Marco
>
> --
> ----------------
> PowerGadgets MVPhttp://www.powergadgets.com/mvp
>
> Blog:http://marcoshaw.blogspot.com Hi Marco, Of course you can ask why I want to do it this way.
I am kicking off some complex scripts that take anywhere from a few
seconds to several hours to run. Due to the way the scripts run, they
need to be launched from the actual directory (I know, strange, but I
was asked to work with them, not change them) So I just need to be in
the actual directory before I launch it. then once the job finishes, I
move up one dir, go into the next dir and kick off the next script. I
could very easily have created a bat file that just went thru the
steps I listed above for each dir, but I really want to start using
powershell and thought this would be a perfectly simple thing to do. I
know once I see the solution I'll be kicking myself for even asking
this question, but right now i just don't see how to accomplish this