View Full Version : Problem with run-time referencing a folder
Mariusz73
02-12-2006, 01:01 PM
I would like to SF7 copy all files being during run-time in a particular, source folder. I have tried using external folder reference feature, but it looks like SF7 remembers all files in the referenced folder during adding operation. And during a run-time it only tries to copy “remembered” files. Any ideas how to achieve my goal?
Jason Pate
02-13-2006, 11:00 AM
Have you tried File.Copy???
Mariusz73
02-13-2006, 11:47 AM
Have you tried File.Copy???
First I would like to make sure that there is no way to do this without scripting (because of problems (?) with showing required space, progress, etc.). Maybe there is some way to "update" the (native SF) file list based on the run-time situation?
Jason Pate
02-13-2006, 04:11 PM
These files are they already on the users system??? Or are you supplying them and if so how? I think you might be stuck with either using File.Copy or external folder, you are right the pro and con is file size vs remembering the files. Now you might use %SpaceRequired%, you could do a File.Search and check the files size of each file, adding it to a the %SpaceRequired% varable. This will take some time to process but should do the trick, then use the File.Copy. to copy your files.
Mariusz73
02-14-2006, 01:41 AM
These files are they already on the users system??? Or are you supplying them and if so how?
The files are distributed along with the installer (in a separate sub-dir).
I think you might be stuck with either using File.Copy or external folder, you are right the pro and con is file size vs remembering the files.
External folder does not suit my needs because SF remembers the files supplied during creating the setup. I would like to add files after generating a setup.exe.
Now you might use %SpaceRequired%, you could do a File.Search and check the files size of each file, adding it to a %SpaceRequired% varable. This will take some time to process but should do the trick, then use the File.Copy. to copy your files.
Yes I was thinking about similar solution, but I think that SF uses _SpaceRequired rather than %SpaceRequired%. It looks like that I need to do some scripting which will copy files "beyond the native setup files" and updates _SpaceRequired accordingly. Anyway – thanks for help.
Eagle
02-14-2006, 07:57 PM
you could use the File.Install action in place of a File.Copy action
--gives you more options
might also be worth a look at:
result = SetupData.GetFileList();
and other related actions..
Mariusz73
02-15-2006, 01:56 AM
Thanks for a tip. But SetupData.GetFileList() is not enough for me (it gives only files which has been known during making a setup; I need to copy files which has been added after creating setup.exe). I made it using pure scripting (File.Find(...), etc.) - it was not as hard as I thought :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.