Valuater 129 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 ;-) Share this post Link to post Share on other sites
buzz44 1 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 Share this post Link to post Share on other sites
MHz 80 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 Share this post Link to post Share on other sites
Valuater 129 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 Share this post Link to post Share on other sites