Announcement

Collapse
No announcement yet.

Checking To See If File Is There

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    Also check out the EXIST function in DOSUNIT.BAS in the \PB\EXAMPLE folder...


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mel Bishop
    replied
    I forgot to add:
    In this case, be sure to kill FI$ and not TE$. FI$ will (should)
    contain the full path whereas TE$ will only contain the file
    name. If you are in a different sub-directory, you'll get a
    "file not found" error message or delete a file you may not want
    deleted.


    ------------------


    [This message has been edited by Mel Bishop (edited February 16, 2002).]

    Leave a comment:


  • John Kerr
    replied
    Wow.. Much easier than I expected.. Appreciate it very much..

    john

    ------------------

    Leave a comment:


  • Mel Bishop
    replied
    fi$ = "somefile.txt"
    te$ = dir$(fi$)
    if te$ <> "" then kill fi$


    ------------------

    Leave a comment:


  • John Kerr
    started a topic Checking To See If File Is There

    Checking To See If File Is There

    Looking for a simple routine to confirm if a file is present or not, and delete it if is there.. Is there a simple command to do this under PB3.5??

    John

    ------------------
Working...
X