Fantastic! Thanks Javier
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Javier Valencia Sent: Tuesday, 29 June 2004 13:01 To: [EMAIL PROTECTED] Subject: [RBG7-L] - RE: Directory and File List Control Frank: I use the following plug-in: PLUGINS loadfilename.rbl vfile_name + |fullpath ON + |initial_dir &vfolder_name + |filter TEXT files (*.TXT)#*.txt#data files (*.DAT)#*.DAT + |title SELECT FILENAME The loadfilename plug-in is normally found in the RRBTI\RBG7 directory, I believe that there is help for this plug-in that describes all the options. In this particular example the variable vfile_name will return the name of the selected file including path. The variable vfolder_name has the name of the directory where you want to start; it is also set up to look for files with DAT and TXT extensions. If you want to separate the file name from the path, I use the following code that will work for all conditions: SET VAR v_lgt = ( SLEN(.vfile_name) ) SET VAR v_pos = ( .v_lgt + 1 ) SET VAR v_slash = '-' WHILE v_slash NE '\' THEN SET VAR v_pos = ( .v_pos - 1) IF v_pos = 0 THEN GOTO slash_found ENDIF SET VAR v_slash = ( SGET(.vfile_name,1,.v_pos) ) ENDWHILE LABEL slash_found SET VAR vfolder_name = ( SGET(.vfile_name, .v_pos, 1) ) SET VAR vfile_name = ( SGET(.vfile_name, (.v_lgt - .v_pos), (.v_pos + 1)) ) The code above should be what you are looking for. Javier. Javier Valencia, PE President Valencia Technology Group, L.L.C. 14315 S. Twilight Ln, Suite #14 Olathe, Kansas 66062-4578 Office (913)829-0888 Fax (913)649-2904 Cell (913)915-3137 ================================================ Attention: The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all system and destroy all copies. ====================================================== -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of van der Zwaag, Frank Sent: Monday, June 28, 2004 7:44 PM To: RBG7-L Mailing List Subject: [RBG7-L] - Directory and File List Control I am trying to build a form which has a directory and file list control in which I want to select a file. I do not want to launch it as such. Is there any way of obtaining the filename that is being selected? I.e. I want to store the name in a variable and than call a module that opens and processes that file. I had it working under 6.5 using the Choose command, however the new controls are far more nicer. Any ideas? Thanks ____________________________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Air New Zealand immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Air New Zealand. _____________________________________________________________________ For more information on the Air New Zealand Group, visit us online at http://www.airnewzealand.com _____________________________________________________________________ ____________________________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Air New Zealand immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Air New Zealand. _____________________________________________________________________ For more information on the Air New Zealand Group, visit us online at http://www.airnewzealand.com _____________________________________________________________________
