Valuater Posted March 19, 2005 Share Posted March 19, 2005 I am trying to run comspec dir for the Username\temp folder .. cant seem to get into Documents and settings with run comspec dir heres the short version.......... 1 works and the other will not??????? #include <GUIConstants.au3> $hdata="\*.*" RunWait(@ComSpec & " /c " & "dir " & @UserProfileDir & "\Local Settings\Temp" & $hdata & " /a :h /b /s" & " > " & @TempDir & "\dir.txt","",@SW_HIDE) ;RunWait(@ComSpec & " /c " & "dir " & @HomeDrive & "\Temp" & $hdata & " /a :h /b /s" & " > " & @TempDir & "\dir.txt","",@SW_HIDE) SLEEP(1000) Run('Notepad "' & @TempDir & '\dir.txt"') Exit i can view C:\$any_folder ..... except C:\Documents and Settings\$any_folder help please ;-) Link to comment Share on other sites More sharing options...
buzz44 Posted March 19, 2005 Share Posted March 19, 2005 could be the use of quotation marks for the variables, i know that it uses different ' and " for different things but dont know which sry =( :"> qq Link to comment Share on other sites More sharing options...
MHz Posted March 19, 2005 Share Posted March 19, 2005 Comspec does not like spaces in the address, so a mixture of single and double quotes, should help to fix this. #include <GUIConstants.au3> $hdata="\*.*" RunWait(@ComSpec & ' /c ' & 'dir "' & @UserProfileDir & '\Local Settings\Temp' & $hdata & '" /a :h /b /s' & ' > "' & @TempDir & '\dir.txt"','',@SW_HIDE) ;RunWait(@ComSpec & ' /c ' & 'dir "' & @HomeDrive & '\Temp' & $hdata & '" /a :h /b /s' & ' > "' & @TempDir & '\dir.txt"','',@SW_HIDE) SLEEP(1000) Run('Notepad "' & @TempDir & '\dir.txt"') Exit Link to comment Share on other sites More sharing options...
Valuater Posted March 19, 2005 Author Share Posted March 19, 2005 Comspec does not like spaces in the address, so a mixture of single and double quotes, should help to fix this.#include <GUIConstants.au3> $hdata="\*.*" RunWait(@ComSpec & ' /c ' & 'dir "' & @UserProfileDir & '\Local Settings\Temp' & $hdata & '" /a :h /b /s' & ' > "' & @TempDir & '\dir.txt"','',@SW_HIDE) ;RunWait(@ComSpec & ' /c ' & 'dir "' & @HomeDrive & '\Temp' & $hdata & '" /a :h /b /s' & ' > "' & @TempDir & '\dir.txt"','',@SW_HIDE) SLEEP(1000) Run('Notepad "' & @TempDir & '\dir.txt"') Exit<{POST_SNAPBACK}>I will try to study the differences........ thanks much MHz 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