Archive: Writing Subdirectories of Path to File using CMD


Writing Subdirectories of Path to File using CMD
hello, trying to write the subdirectories of a path using cmd

here is the code:

Section
ReadRegStr $0 HKLM "SOFTWARE\TestTest" InstallPath
StrCmp $0 "" exit installed
exit:
MessageBox MB_OK "Not installed!"
Quit
installed:
MessageBox MB_OK "installed! $0"
Push "$0DataList"
Pop $1
MessageBox MB_OK "List Directory: $1"
ReadEnvStr $R0 COMSPEC
ExecDos::exec '"$R0" /c "dir $1 > %TEMP%\listbackup.txt"'
SectionEnd

it simply does not work, it creates listbackup.txt but no content

any advice?

examples much appeciated

thank you


your quotes are wrong, try '"$R0" /c dir "$1" > "%TEMP%\listbackup.txt"'

also, are you sure ExecDos::exec supports redirection?

or just use FindFirst/Next that is already built-in