Diana (Cda) Posted May 15, 2009 Share Posted May 15, 2009 (edited) I have a really great app that does a great job but that has trouble with spaces in its own filepath and name. It won't launch unless I somehow use its 8.3 filepath as I do with the script I set up, as seen here:;============================================================================== $app2launch = "L:\VIDEO\VIDTOO~1\APPP-A~1\avifrate.exe" ;============================================================================== ShellExecute($app2launch)'course, the minute I move it to its permanent folder or change the name of the folder for whatever reason (i.e., after a wipe/reinstall when Windows assigns another drive letter) this won't work anymore. Is there a way to script with @ScriptDir to make it a relative path but eliminating the spaces in the filepath somehow, like the DOS 8.3 format does, by any chance? I haven't a clue on how to do that but perhaps someone here does. Thanks! p.s., before someone kindly advises using the Windows utility to change drive letters, gave up after the third consecutive time XP insisted on reverting back to the drive letters it wanted! <g> I afterwards just ended up creating a UDF that all scripts reference for navigating my computer and just update that once after a wipe/reinstall. Much more reliable system this way! Gotta love AutoIt; it makes up for so many Windows deficiencies! <g> Edited May 15, 2009 by Diana (Cda) Link to comment Share on other sites More sharing options...
Khab Posted May 15, 2009 Share Posted May 15, 2009 (edited) $shortPath = FileGetShortName(@ScriptDir & "\avifrate.exe") Assuming your AutoIt script is in the same folder as avifrate.exe Edited May 15, 2009 by Khab Link to comment Share on other sites More sharing options...
Diana (Cda) Posted May 15, 2009 Author Share Posted May 15, 2009 $shortPath = FileGetShortName(@ScriptDir & "\avifrate.exe") Assuming your AutoIt script is in the same folder as avifrate.exeCan't say it enough: gotta love AutoIt!!! Thanks, this works just great on all the trials I just did. My script now looks like this:; ; AutoIt ; ;======================================================================= $8point3_short_filepath = FileGetShortName(@ScriptDir & "\avifrate.exe") ;======================================================================= ShellExecute($8point3_short_filepath) Exit ; finishedThanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now