I am running this command
C:\php\php.exe -f C:\leads\ftp.php
with a bat file with a windows scheduled task and all works well. The php file goes to the ftp and grabs a file to store locally. The problem is the location that the file is being stored locally is not in the C:\leads\ directory. It is being saved in the C:\Windows\sysWOW64\
If I click on the bat file it stores the file in the C:\leads\ directory as expected
any ideas on how to remedy this
Add:
before your
php.execommand. This is happening because the working directory is set differently whether your batch file is running from a scheduled task or from you double clicking on it. This way you can force the PHP working directory to be what you want.