PDA

View Full Version : Allow user to identify a specific file.


jafoery
10-21-2004, 10:52 AM
:huh I am using the 'packages' feature to allow the user to choose between a full install (with a new database) or an upgraded install (keeping thier old database).

I am having a problem however because I need to have the user identify where thier existing database file is located. I have found that I can use the "Select Folder" screen to save a folder path to a variable, but I have not been able to find any screen that will allow the user to specifically identify a single file within a folder (and then save that path / filename in to a variable).

Can anyone help??

Darryl
10-21-2004, 12:02 PM
Take a look at the Edit Boxes screen. On the Custom tab you will see a field labeled "Browse button style". In the dropdown you can select "file" and it should accomplish what you are trying to do.

Hope that helps.

Darryl

jafoery
10-22-2004, 01:24 AM
Thanks Darryl. That helps a lot. One more question. Is it possible to seperate the path from the filename, ending up with two variables?

For example, user browses to find: c:\program\file.ext using the solution you provided with the 'Edit Boxes' screen I have the choice of saving either "Folder" or "File". The "Folder" option does indeed save only the folder (path) information, however, when I select the "File" option, it saves both the filename as well as the path into the variable name.

Do you know of a way that I could parse out the filename from the path and save them as seperate variables? I am thinking of trying to use some of the string actions to find the last occurance of the / and then read everything to the right of it (that becomes the filename variable)... but too seems rather difficult to accomplish in SF6.

jafoery
10-22-2004, 01:34 AM
Sorry. I guess users should pay more attention to the help files you spend so much time creating.

I just discovered the ParsePath sting action. It is working wonderfully. Thanks!