Sign in to follow this  
Followers 0
neverasunset

Spaces in file pathname

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



ShellExecute() bro.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

thanks! gonna try it now

Share this post


Link to post
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
Sign in to follow this  
Followers 0