SyntaxFix
Write A Post
Hire A Developer
Questions
Try this link
You do not use "cd" to change the directory from which to run your commands. You need the full path of the executable you want to run.
Also, listing the contents of a directory is easier to do with the File/Directory classes