Problem with spaces in script file

Problem with spaces in script file

danglar
Advocate Advocate
688 Views
3 Replies
Message 1 of 4

Problem with spaces in script file

danglar
Advocate
Advocate

I have a program for add file prefix "Xref-" and suffix as current date
and open modified XREF file with close and delete previous file (see attached lisp).
Program working properly until you have file name with spaces between words
(example: pump station.dwg) or you have a path with spaces between words
(example: c:\Pump station\example.dwg)
Can somebody fix it?

0 Likes
689 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

@apelbaum2014 wrote:

....
Program working properly until you have file name with spaces between words
(example: pump station.dwg) or you have a path with spaces between words
(example: c:\Pump station\example.dwg)
Can somebody fix it?


I believe if you enclose them in double-quotes, all will be well:

"pump station.dwg"

and

"c:\Pump station\example.dwg"

Kent Cooper, AIA
0 Likes
Message 3 of 4

danglar
Advocate
Advocate
Path and name of file here is a variable (not constant) so I need to do it programmaticaly somehow...
0 Likes
Message 4 of 4

kerry_w_brown
Mentor
Mentor

 

 

http://www.theswamp.org/index.php?topic=50551.msg556774#msg556774


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes