Quote Originally Posted by Mr. C. View Post
Of course it doesn't work. The ls command should not return /home/user/foldername. You are misunderstanding working directories and process invocation.
Yeah I understood, I posted that before I saw your later post
Thanks