Space on path

Hello,

I have this simple code to import some file to rhino, the path is correct
but “Program Files” have a space, this cause problems on comand
import, there is any way to sove this?

path = “C:\Program Files\data\teste\file.3dm”

commandline = “_-Import " + path + " _Enter”

ok = rs.Command(commandline)

thank you

Hi @ricardo.eira,

Try:

path = "C:\\Program Files\\data\\teste\\file.3dm"
path = "\"" + path + "\"" # Escape the double quotes
print path

– Dale

Hello Dale,

The problem is not //, the problem this the space between “Program” and “Files”, this space
cause path interruption.

“C:\Program.3dm not found, unable open”

Thanks

Note the espaced double quotes in the sample from @dale. Those will ensure proper path.

OK, I was doing rong, is solve thank you.