|
|
#1 |
|
Junior Member
Join Date: Feb 2010
Posts: 14
|
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. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2010
Posts: 14
|
..hmm, yes, sorry. Very basic question.
Compile time versus runtime. Thanks! |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Feb 2010
Posts: 14
|
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. |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
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. |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: May 2009
Posts: 152
|
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.
|
|
|
|
![]() |
|
|||||||
| Tags |
| file, variable |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|