In Windows 8: I have a php file which needs to be run from the scheduled tasks through .bat file. The PHP is located in: P:\php\php.exe The file to run is located in: W:\folder\file.php
my .bat file looks like this:
cmd /c p:\php\php.exe w:\folder\file.php
It does not run. When I open cmd and switch to the file folder and run it from there, the file executes properly.
i.e.: W:\folder> p:\php\php.exe w:\folder\file.php
I have to add something to the .bat file which navigates to this w:\folder and executes it in the same manner but I cannot figure out what. I tried other posts (replies) i.e.: How to change current working directory using a batch file
but it did not take any effect. Can anyone help me to write the correct command for the .bat file please ?
you might try this:
This may also work:
this is how I solved the problem, try this:
this seems to work.