Yes, the c:\temp folder needs to exist for it to work. Why the batch file, did it not work without it? Though sometimes KC is funny about running internal DOS commands like date. In that case you can try: exec "cmd /c date /T > c:\\temp\\test.txt"