Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Writing Subdirectories of Path to File using CMD (http://forums.winamp.com/showthread.php?t=301115)

parasoul 16th December 2008 09:26

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

Anders 16th December 2008 10:02

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


All times are GMT. The time now is 04:31.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.