Jump to content

Spaces in file pathname


Recommended Posts

Hi all,

I'm trying to open a file using the Run function and an error message pops up with garbled messages so I wouldn't have an idea that its trying to tell me BUT I'm guessing that it's trying to tell me that there shouldn't be a blank space in the path name...

Question is, how should I write it if that space is the source of the error?

Run("D:\Games\Perfect World\elementclient.exe")

Thanks in advance!

Edited by neverasunset
Link to comment
Share on other sites

Hi all,

I'm trying to open a file using the Run function and an error message pops up with garbled messages so I wouldn't have an idea that its trying to tell me BUT I'm guessing that it's trying to tell me that there shouldn't be a blank space in the path name...

Question is, how should I write it if that space is the source of the error?

Run("D:\Games\Perfect World\elementclient.exe")

Thanks in advance!

Run() does not have a problem with spaces in the path. More likely it wants a working directory:
Run("D:\Games\Perfect World\elementclient.exe", "D:\Games\Perfect World")

If you did have something that was sensitive to complex paths (i.e. CMD shell commands) then you would convert them to 8.3 format with FileGetShortName(). For example, "D:\Games\Perfec~1\elemen~1.exe". See help file.

>_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...