Alpha Video Training
Results 1 to 6 of 6

Thread: ? File Exists (xBasic)

  1. #1
    Member
    Real Name
    Marty Francom
    Join Date
    Jan 2011
    Posts
    43

    Default ? File Exists (xBasic)

    I did a search on Alphawiki for File Exists command or example but did not find an example. And the A5 "Exist" command doesn't have to do with files.

    With xBasic how do I determine if a file exists?

    lets say:
    cMyFile = "C:\MyDierectory\MyFile.txt"
    in PowerBasic I would use:
    rc = Exists(cMyFile) 'returns true/false

    How do I do this in xBasic?

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: ? File Exists (xBasic)

    There can be only one.

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,308

    Default Re: ? File Exists (xBasic)

    Marty, try typing "exists" in the Google search input box on the alphapedia home page.

  4. #4
    Member
    Real Name
    Marty Francom
    Join Date
    Jan 2011
    Posts
    43

    Default Re: ? File Exists (xBasic)

    Tom,
    I tried "Exist" and got 1066 wiki pages
    "File Exist" got 198 wiki pages
    my searching didn't find it.
    Also, tried A5 Help... didn't find it under Exist
    had I thought to look under "File Functions and methods"
    then I would have found it. Now I know.


    Stan, thanks. That's what I needed.

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,308

    Default Re: ? File Exists (xBasic)

    Hi, Marty. I wasn't trying to "pile on" or anything. Finding the right search string is often frustrating. Like to trying to find a word you need in the dictionary when you don't know exactly how its spelled.

    The "Xbasic Functions and Methods Listed by Type" page is a very good resource for things like this. I'm glad you've found it.

    -- tom

  6. #6
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,535

    Default Re: ? File Exists (xBasic)

    Quote Originally Posted by mocnarf View Post
    Tom,
    I tried "Exist" and got 1066 wiki pages
    "File Exist" got 198 wiki pages
    my searching didn't find it.
    Also, tried A5 Help... didn't find it under Exist
    had I thought to look under "File Functions and methods"
    then I would have found it. Now I know.
    On the other hand why not directly seek FILE.EXISTS Method with highlighted keyword(=Alphapedias own keywords) search in search box in Alphapedia.

    Result: Found 2399 wiki pages. Great.

    When you scroll down the first result page there is file.exists method but before it is 23 other "founds" for example CHECKOUTCOMP.A5W, REDIM AND A5.LOAD Method.


    What about Google search box in Alphapedia.
    Result: Odd, it did found it and is in the top of the list.

    Maybe this tells something about... Al.. I mean Google

Similar Threads

  1. File exists, Choose a different file. Blank Web Apps Control Page
    By AAVasaris in forum Application Server Version 9 - Web/Browser Applications
    Replies: 5
    Last Post: 06-25-2008, 05:06 PM
  2. file.exists() or similar command for multiple files
    By spain246 in forum Archived Wishlist
    Replies: 3
    Last Post: 01-11-2007, 08:41 AM
  3. XBasic method for folder exists?
    By brett s in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-08-2004, 09:39 PM
  4. file.exists() problem
    By Tony Rutherford in forum Alpha Five Version 4
    Replies: 11
    Last Post: 10-16-2001, 11:19 PM
  5. FUNCTION File.Exists() does not exist
    By Jesse Sanders in forum Alpha Five Version 4
    Replies: 5
    Last Post: 06-27-2001, 07:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •