PDA

View Full Version : Single EXE file and external folder


nals
10-26-2008, 09:26 PM
Can someone please correct this code:

if e_Key == 13 then

sSearchFile = ".\\mydatafolder" -- This is wrong this folder sould be external

--name listbox as a vaiable
LB = "LB_FileListStep1";



I made a single file search exe portable file, but the "mydatafolder" folder inside the root folder where the exe file is.
So i can add more files to "mydatafolder" without changing the exe file,, hope someone understand :(
:huh

nals
10-27-2008, 12:56 AM
Ok I manage to do this with 2 files and a folder NOT 1 file and 1 folder :huh

if e_Key == 13 then
sSearchFile =_SourceFolder.."\\mydatafolder"


and Build as Hard drive folder instead of Web/Email executable (in this way I can't add any buttons to project)

The 2 files are autorun.exe, autorun.cdd, and my mydatafolder

If there is a way I can do with only 1 EXE file please let me know.
Thanks

RizlaUK
10-27-2008, 06:35 AM
with a web exe you need to access the commandline arguments that are sent the sfx at runtime, the path to the folder that the web exe was run from is always the last item in the __CommandLineArgs table

sRootFolder = _CommandLineArgs[Table.Count(_CommandLineArgs)]

the above code gets the path to the folder that the exe was run from, not the temp folder, but this will not work in preview mode, you will need to setup a switch for preview and build versions

nals
10-27-2008, 07:04 AM
Thanks RizlaUK

:yes