| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIFileClass > AsciiFileClass Methods >====== GetDOSFilename (let end user select file) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[formatline a virtual to format text .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getfilename return the filename .htm|{{btn_next_n.gif|Next page}}]] | | || **GetDOSFilename( **//filename //**), VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **GetDOSFilename** | Prompts the end user to select the file to process. | | //filename// | The label of the ASCIIFile property's NAME attribute variable which receives the selected filename. | The **GetDOSFilename **method prompts the end user to select the file to process and returns a value indicating whether the end user selected a file or did not select a file. A return value of one (1) indicates a file was selected and //filename //contains its pathname; a retun value of zero (0) indicates no file was selected and //filename //is empty. **Implementation:** The GetDOSFileName method uses a SelectFileClass object to get the filename from the end user. **Return Data Type:     **BYTE **Example:** **MyAsciiFileClass.Reset FUNCTION(*STRING FName)** **RVal      BYTE(True)** **SavePath  CSTRING(FILE:MaxFilePath+1),AUTO** **  CODE** **  CLOSE(SELF.AsciiFile)** **  SavePath=PATH()** **  LOOP** **    IF ~FName AND ~SELF.GetDOSFilename(FName)** **      RVal=False** **      BREAK** **    END** **    OPEN(SELF.AsciiFile,ReadOnly+DenyNone)** **    IF ERRORCODE()** **      MESSAGE('Can't open ' & FName)** **      RVal=False** **    ELSE** **      BREAK** **    END** **  END** **  IF RVal** **    SELF.FileSize=BYTES(SELF.AsciiFile)** **  END** **  SETPATH(SavePath)** **  RETURN RVal** **See Also:** [[asciifile the ascii file .htm|ASCIIFile]], [[selectfileclass.htm|SelectFileClass]]