Skip to content
⌘ NSIS Forum Archive

I can't use my var in File

6 posts

fabiochelly#

I can't use my var in File

Is it possible to use a variable in an instruction 'File', for instance:
strcpy $MYVAR "f1"
File "c:\$MYVAR\*.*"
Currently, I get an error 'no files found' but there are files in the folder "c:\f1"
Vytautas#
No variables are run-time and the file instaruction has to get the files from your PC at compile-time.

Vytautas
atsuk#
at the moment $MYVAR is not file, but a string, that is considered as a directory in file instruction. you should have c:\f1 directory in your computer..i think
fabiochelly#
And is it possible to use the section name instead of a variable in a 'File' instruction?
In fact, $MYVAR contains the section name