I have a shell command in Windows that copies and renames a folder to the same location.
The working command looks like this:
xcopy \\my-server\ourstuff\live_projects\xxxx_Project\*.* \\my-server\ourstuff\live_projects\projectstr /e /k /i /c I want to execute this command from within PHP using the exec() function.
projectstr should really be a string variable ($projectstr) that, at present, may contain alphanumeric characters, spaces, minus signs, and underscores, but not commas, apostophes, or quotation marks.
Is there a simple technique for rewriting this for the exec() command? I get so lost in backslashes and quotation marks that I don't know whether I'm coming or going.
Any help appreciated.