I know this is a PHP board, but what you are trying to do is just not right. Bash and the other Unix shells have scripting abilities added to them so that simple administration tasks such as this one can be written once and then just used instead of having to type many commands over and over again.
I know that shell scripting is a scary thing to jump into for the first time, but go get yourself a good book on shell programming and you'll find that it's much easier that trying to juryrig something to work using PHP.
I personally like this book for learning Bash booksmatter.com. But there are plenty of them out there.
And a basic Bash script for moving a file from 1 place to another would be something like this:
echo 'Please enter the file name you want to move:'; read myFile
echo 'Please enter where this file will go (include the file name only if it will be changed):'; read newFileLocation
mv $myFile $newFileLocation
echo "DONE"