New
#1
Schtasks not working properly, Windows 7
Hi, I am making batch file program which monitors computer tasklist, openfiles and system variables every x minutes.
This is my scheduled bat file, ks1.bat, which outputs openfiles to txt file:
This is line in main batch which shedules to run this file:Code:@echo off cd.. cd results md %date% cd %date% echo Computer detective is running... echo. echo Copying active files list... openfiles > Active_Files_List.txt echo Task completed. Detective closes... ping -n 3 127.0.0.1 >nul exit
Problem is when ks1.bat is scheduled to run from main program, I see only ks1 cmd window splash and no commands are done. I also tried to schedule ks1 from desktop including full path, but then I get two lines which say The system cannot find the path specified and file or directory already exists.Code:cd ComputerDetective cd Tasks schtasks /create /sc minute /mo %minutes% /tn "Computer detective" /tr ks1.bat
Please help me to solve this problem. Sorry for my bad english if it's so, I am from Lithuania. Thank you in advance.
Last edited by neone; 22 Oct 2012 at 12:15.