in reply to Re: trouble with a simple script
in thread problem running executable in subdirectories

For one thing you never change back to the initial (or main) directory.

The script's directory never changes, only the child's, so that's not true. The only major problem in the OP's code is the extra "`" that prevents the script from even compiling. Also, if he's using cmd (i.e. not a cygwin build), ";" must be changed to "&".

Lesser problems include lack of error checking, lack of proper conversion from strings to shell literals, and possibly useless use of backticks.

Update: Added lesser problems.
Update: He's not on Windows as I believed.