access server directories

Hi,

I am using webfile for downloading.
At the moment I have to put the available file in the same folder as the web app but would like to get it from a specific directory outside the cgi-bin.

[code] dim f as FolderItem

#if debugbuild then
//If we are in debug…lets back out of the debug folder to the parent directory (where myfolder is located)
f=GetFolderItem("").Child(FileToDownload)

#else
//We aren’t in debug, so we are in the root directory of the application
f=GetFolderItem(FileToDownload)

#endif[/code]

Any info would be appreciated.

John

You will only be able to do that if the user that your app is running under has permission to write elsewhere on the drive.

Ok, but how is it done.

GetFolderItem. Don’t over-think it.

Ah right you are Tim.

Something like this perhaps?

f = app.executablefile.parent.parent.child("files").child(filename)

which would get you the file in a folder next to the cgi-bin folder named “files”.