Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbFindFirst, dbGetFileName etc.

Author
Message
InsanitY
15
Years of Service
User Offline
Joined: 6th Aug 2009
Location: The Netherlands
Posted: 18th May 2010 13:19 Edited at: 18th May 2010 15:48
First of all, the documentation says "dbGetFileName$", but Visual C++ only accepts dbGetFileName, so I don't know what the dollar sign means?

That said, using this function doesn't work for me. I've searched the forums and only found 2 old threads, I really hope something has changed since then?

What exactly doesn't work: when I use

It only displays "-" or something that looks like it, while it displays the files when I just use dbDir(), so it is not searching for files in an empty directory.

Can you guys please help me out by either confirming dbFindFirst etc. don't work, or by explaining to me what I'm doing wrong?

EDIT: When I use dbGetFileType() it returns 1, meaning it's a directory.. but there is no sub directory in the working directory, so I'm really confused now.
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 18th May 2010 18:17
I think there's a dbFindNext function that will return the next file in the list. You would use the two combined in some kind of loop for processing individual files... Not entirely sure though.

JTK
InsanitY
15
Years of Service
User Offline
Joined: 6th Aug 2009
Location: The Netherlands
Posted: 18th May 2010 18:35 Edited at: 18th May 2010 19:39
Yes there is a dbFindNext, but dbFindFirst should find the first file in the directory. I've already tried using dbFindNext, but without (good) results.
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 18th May 2010 21:31 Edited at: 18th May 2010 21:33
The first file in any directory is: "."
The second: ".."

They are for moving backward/(and double backward?) through the directory hierarchy.

It's working.

The dollar sign is there because the documentation is taken directly from dbp, which is a symbol for a string.

"A computer once beat me at chess, but it was no match for me at kick boxing."
Emo Philips
InsanitY
15
Years of Service
User Offline
Joined: 6th Aug 2009
Location: The Netherlands
Posted: 18th May 2010 21:54 Edited at: 19th May 2010 00:35
Ah thanks, the third file is indeed the file I was looking for.
I didn't know about those 'files' and I don't really see how they are used for moving backwards through the directory hierarchy, but I guess a simple Google will inform me about that.

EDIT: Oh yeah now I remember them from DOS, but I was really young back then.

Thanks again, and.. lol at your signature

Login to post a reply

Server time is: 2024-11-19 23:29:49
Your offset time is: 2024-11-19 23:29:49