Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: Problem with and windows schtasks

Thread Tools

RE: Problem with and windows schtasks

Prasad, Ramit
Posts: n/a
Dave Angel wrote:

> On 11/20/2012 06:41 PM, Tom Borkin wrote:
> (Please don't top-post. Now we lose all the context)

> > Using shlex, I now have this:
> > #!\Python27\python
> > import os, subprocess
> > path = os.path.join("C:\\", "Program Files", "Apache Group", "Apache2",
> > "htdocs", "ccc", "")
> >['SchTasks', '/Create', '/SC', 'ONCE', '/TN','"test"',
> > '/TR', path, '/ST', '23:50'])
> >['SchTasks', '/Create', '/SC', 'ONCE', '/TN', '"test"',
> > '/TR', '', '/ST', '23:50'])
> > Both of the above commands throwthe same error:
> > ERROR: The filename, directory name or volume label syntax is incorrect.

> I don't use Windows, but doesn't aWindows program usually have an .exe
> extension? So why would youexpect it to find SchTasks ? Adding
> extensions is a shell feature,and you're not using the shell.
> Also, you should take a look at the value "path". On Linux, it shows up as:
> C:\\/Program Files/Apache Group/Apache2/htdocs/ccc/
> It'll be different under Windows, but probably still wrong.

Windows 7 + Python 2.6

>>> os.path.join("C:\\", "Program Files", "Apache Group", "Apache2",

... "htdocs", "ccc", "")
'C:\\Program Files\\Apache Group\\Apache2\\htdocs\\ccc\\'


This email is confidential andsubject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entitydisclaimers,
available at
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Problem with and windows schtasks Tim Golden Python 0 11-21-2012 10:01 AM
Re: Problem with and windows schtasks Dave Angel Python 0 11-21-2012 01:28 AM
Re: Problem with and windows schtasks Chris Rebert Python 0 11-18-2012 04:39 PM
Re: Problem with and windows schtasks Tim Golden Python 0 11-18-2012 04:19 PM
schtasks problem cct ASP .Net Security 0 11-12-2003 08:23 AM