AverageJoe Posted November 12, 2013 Share Posted November 12, 2013 Hi everyone, got a little project here. I intend of writting all the files to an array using '_FileListToArray' so i can filter just the files i want. Then ill open them one at a time using 'run' however - the 'Start' command will not handle spaces in the filenames - i've tried lots of things here to get around it. I started with the entire path - $stringPath = "C:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\THICKNESS _ PIMM_3058 3062.utdata" MsgBox ( 0, "Checking string", $stringPath) $ProgramCall = Run(@ComSpec & " /c " & 'Start' & $stringPath) If 0 == $ProgramCall Then MsgBox (262144, "Failed", "Failed to load veo software") EndIf and it tells me C:Documents" cannot be found - fair enough i think :-) so i looked at how to get around the spaces, $stringPath = "C:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\" $filename = "THICKNESS _ PIMM_3058 3062.utdata" MsgBox ( 0, "Checking string", $stringPath) $ProgramCall = Run(@ComSpec & " /c " & 'Start' & $filename , $stringPath, @SW_HIDE) and still no luck, it says it cannot find "THICKNESS" - which really is an iteration of my first concern and if I can it will be massively helpful to use the spaces in the file name, becasue the equipment we use that makes the .utdata files is best used by making file names with spaces. Cheers Everyone Joey Link to comment Share on other sites More sharing options...
trancexx Posted November 12, 2013 Share Posted November 12, 2013 You have this string: $stringPath = "C:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\THICKNESS _ PIMM_3058 3062.utdata" ...Added here: @ComSpec & " /c " & 'Start' & $stringPath That would get you this: "C:\Windows\system32\cmd.exe /c StartC:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\THICKNESS _ PIMM_3058 3062.utdata" So, it really makes no sense. Add space after "Start". ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 14, 2013 Share Posted November 14, 2013 You also need to quote filenames when used in this fashion, or convert them to short filenames which still exist for legacy purposes. Link to comment Share on other sites More sharing options...
Albie Posted November 15, 2013 Share Posted November 15, 2013 Nice. 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