Host command with blanks in the path

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Host command with blanks in the path

la volta statistics
Hi all

I have directory names with blanks in the name.
Is there a way of using the HOST command for making a new directory when I
have blanks in the directory names. For Example:

HOST COMMAND=['IF not exist d:\temp today\NewDir    MD d:\temp
today\NewDir'].

* This Command terminates with exit status 001.
* while the following command would work.

HOST COMMAND=['IF not exist d:\tempToday\NewDir    MD d:\tempToday\NewDir'].

Thanks in advances, Christian


*******************************
la volta statistics
Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
Ch-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
mailto:[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Host command with blanks in the path

Peck, Jon
You need to follow DOS conventions.  Just enclose the path in double quotes (") and use single quotes around the whole command.

HTH,
Jon Peck


-----Original Message-----
From: SPSSX(r) Discussion on behalf of la volta statistics
Sent: Wed 11/8/2006 4:25 AM
To: [hidden email]
Subject:      [SPSSX-L] Host command with blanks in the path
 
Hi all

I have directory names with blanks in the name.
Is there a way of using the HOST command for making a new directory when I
have blanks in the directory names. For Example:

HOST COMMAND=['IF not exist d:\temp today\NewDir    MD d:\temp
today\NewDir'].

* This Command terminates with exit status 001.
* while the following command would work.

HOST COMMAND=['IF not exist d:\tempToday\NewDir    MD d:\tempToday\NewDir'].

Thanks in advances, Christian


*******************************
la volta statistics
Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
Ch-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
mailto:[hidden email]