Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   directory to text-file problem (http://forums.winamp.com/showthread.php?t=287285)

Yathosho 20th February 2008 20:19

directory to text-file problem
 
1 Attachment(s)
so far i've been using this snipped of code to write files and their location into a simple text-file.
code:
GetTempFileName $R0
ReadEnvStr $R1 COMSPEC
nsExec::Exec '"$R1" /C dir "$R9\*.avs" /a-d /b /s /on>$R0"'


though i know this could probably be done much more elegantly using the array plugin, i've never had a problem with the code until recently.

the attached file shows the the result of the dir command when using it on a folder containing the german letter ü in the word einzelstücke (likely happens with other characters such as á or è aswell). the reason why i'm creating this text-file in the first place, is to read the path to each file line-by-line later in my script. due to the problem with certain letters, i'm now looking for a more safe solution using nsis code. a workaround that replaces the affected characters would be a clumsy ways to do this.

i can think of reading those file-locations using the find command, but my problem comes up when the target directory contains multiple sub-directories of different structures.

at some point in the past afrow hinted me to using the arrays plugin, but the problem of directory-structures is still over my head.

for any hints, i'm very thankful.

kichik 20th February 2008 21:52

Locate is what you're looking for. It will call a function of yours for every file it finds.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.