E J Pope
asked on
MS Task Scheduler (0x1)
I think I have tried everything, but I still get a task that won't work. All I want to do is move a file from one directory to another via running a .bat file
Here is what I have tried. - Made sure user (domain\administrator) has logon as batch rights, run whether user is logged on or not, run with highest privileges, on ACTION tab I put the path in additional arguments instead of programs, and made sure the user has all privileges to the folders involved.
The task will from the cmd prompt.
I do not understand why if I run this as an admin that I should have any privilege problems?
Program is running on a virtual server. (Windows Server 2008R2, Management Console 3.0, Version 6.1)
Does anyone have any other suggestions?
Thanks,
Cindy
Here is what I have tried. - Made sure user (domain\administrator) has logon as batch rights, run whether user is logged on or not, run with highest privileges, on ACTION tab I put the path in additional arguments instead of programs, and made sure the user has all privileges to the folders involved.
The task will from the cmd prompt.
I do not understand why if I run this as an admin that I should have any privilege problems?
Program is running on a virtual server. (Windows Server 2008R2, Management Console 3.0, Version 6.1)
Does anyone have any other suggestions?
Thanks,
Cindy
You may need to fill in the "start in" field with the folder location of the batch file.
ASKER
YES, I have a copy and then delete. I also tried move.
It still doesn't work using CMD.EXE
I have the same syntax code in another .bat file and it runs great.
It still doesn't work using CMD.EXE
I have the same syntax code in another .bat file and it runs great.
so what exactly did you input in the command field of Task Scheduler? just a BAT file name?
ASKER
Here is entire BAT file
CMD.EXE /C MOVE "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERIMPORT\Faile dXML\*.*" "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERIMPORT\FAILE D and not processed2"
exit
Here is ACTION tab on Task Scheduler
Program Script = OrderFailedMove.bat
Start in = C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\
CMD.EXE /C MOVE "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERIMPORT\Faile
exit
Here is ACTION tab on Task Scheduler
Program Script = OrderFailedMove.bat
Start in = C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am sorry but can you tell me what to put in each line of the task scheduler.
Here is what I have tried and the task will not even run - directory invalid.
Program script = cmd.exe
Arguments = /C "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\OrderFailedMove. bat"
Start in = C:\Windows\System32\
Here is what I have tried and the task will not even run - directory invalid.
Program script = cmd.exe
Arguments = /C "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\OrderFailedMove.
Start in = C:\Windows\System32\
ASKER
Now I get a 0x1 error when I do this. (I moved the bat file)
Program script:
"C:\Windows\System32\CMD32 .EXE /K OrderFailedMove.bat"
Any insight into the combination that works for program script, arguments, and start in would be appreciated.
Program script:
"C:\Windows\System32\CMD32
Any insight into the combination that works for program script, arguments, and start in would be appreciated.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
bbao gave me the information I needed to get the final program script to work
if yes, at Task Scheduler's command field, you need to run Windows Command Shell to invoke the MOVE or COPY commands as the commands are Shell Commands, not standalone executables.
what you should input look like this: CMD.EXE /C MOVE Pathname1 Pathname2