Page 1 of 1

Tip: Tiny code to find a file on disk

Posted: Wed Jan 16, 2002 10:28 am
by BackupUser
Code updated For 5.20+

Restored from previous forum. Originally posted by PB.

Here's some short code to find a file on any disk or hard drive.

Code: Select all

path$=Space(255) : r=SearchTreeForFile_("c:\","FileToFind",path$)
If r=0
  MessageRequester("Error","File not found...",0)
Else
  MessageRequester("Location",path$,0)
EndIf

PB - Registered PureBasic Coder

Edited by - PB on 18 January 2002 00:51:52

Posted: Thu Jan 17, 2002 2:04 am
by BackupUser
Restored from previous forum. Originally posted by Steve.

Short and sweet.
And Works as advertised.
Thanks

Steve - Reg. PB user

Posted: Thu Jan 17, 2002 3:32 am
by BackupUser
Restored from previous forum. Originally posted by PB.
Short and sweet.
Yep, using the API is a wonderful way to code in PureBasic.
Of my apps, I'd say about 40% of their code are API routines and not
actually BASIC at all...


PB - Registered PureBasic Coder


Edited by - PB on 17 January 2002 03:34:07

Posted: Thu Jan 17, 2002 7:48 am
by BackupUser
Restored from previous forum. Originally posted by Rings.
Of my apps, I'd say about 40% of their code are API routines and not
actually BASIC at all...
Oh yes API solve most of the problems.But there are new Problems if you want compile to Linux(If Not , forget my comment ).Thats wh i want most of the API's in Basic-Commands to port it between OS's .

Siggi

Posted: Thu Jan 17, 2002 9:38 am
by BackupUser
Restored from previous forum. Originally posted by PB.
Oh yes API solve most of the problems.But there are new Problems if you want compile to Linux(If Not , forget my comment ).Thats wh i want most of the API's in Basic-Commands to port it between OS's .
I know what you mean, but like you said: I don't use Linux/Amiga so it's of no
concern to me. :)


PB - Registered PureBasic Coder