Quantcast
Channel: Sysadmin
Viewing all articles
Browse latest Browse all 164431

Scheduling tasks from the command line - how do you execute a file that has spaces in the path/filename?

$
0
0

Currently, my batch file is as follows:

schtasks /create /tn "Install Sophos" /tr "\<server name goes here>\Sophos Setup\Install Sophos.bat" /sc once /sd 08/05/2011 /st 11:00

(There are two backslashes for the share, for some reason Reddit only shows one here)

It says it succeeded, and yet when I go into the task scheduler to check on it (since it did not go off at the scheduled time), I notice it says it cannot find the file specified. Why, I wonder... well, it set "\<server name goes here>\Sophos" as the program, and "Setup\Install Sophos.bat" as an argument. Why?

If anyone could help clear this up and steer me in the right direction, I'd appreciate it.

submitted by Skyline969
[link] [14 comments]

Viewing all articles
Browse latest Browse all 164431

Trending Articles