![]() |
File command
Since the name file is very common it's very hard to find an answer to my question. In case there is a double post now, please forgive me. Searching for 'file' and 'variable' gives me 700 pages to read...
Is it possible to do something like: StrCpy $R0 "file.txt" File $R0 I want to use the File command with a variable as parameter. |
|
..hmm, yes, sorry. Very basic question.
Compile time versus runtime. Thanks! |
Maybe someone places a chapter into the documentation 'Compile time versus runtime', since it is not really obvious (at least to me). Both command types are listed in the same script file, e.g.
SetOutPath "$Target" ; where Target can be a define or a variable File "$OutFile" ; and with the file command it must not be a variable It would be good to pinpoint the difference for both command types. |
File is a special case since it's both a compile time and runtime command. That's why it's in the command list.
The compile-time functionality of File should be pretty obvious: You cannot compress into the installer .exe what doesn't exist on the developer's PC. That's why you cannot do File $Variable, because the compiler has no idea what $Variable is supposed to contain. |
If I want to process a lot of files I create a macro then create an external AutoIt, VB, perl, or whatever script to preprocess the files and create a "MyFiles.nsh" file that calls the macro for each file. I then !include the "MyFiles.nsh" after I run the AutoIt Script.
|
| All times are GMT. The time now is 17:24. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.