What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Enumerating through files in Win32

[?] Enumerating through files in Win32
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] Enumerating through files in Win32
quote:
Originally posted by SmokingCookie
That does it; I guess that using the result object in the loop changes the references stored in the array..?
Not exactly, you are changing the handle of the directory you are searching.

So you said find me the files in folder XYZ, it finds the first file as "." then you said find me the next file in XYZ and it found ".." but then you changed the handle of the object you were searching from XYZ to "..". Does that make sense?

If it doesn't make sense here is some pseudo since I am now on a computer and not my iPad:

This is what you should be doing

FindFirstFile ('XYZ')
> retval = 1
FindNextFile(1)
> retval = 100
FindNextFile(1)
> retval = 100

What you are doing is this
FindFirstFile ('XYZ')
> retval = 1
FindNextFile(1)
> retval = 100
FindNextFile(100)
> retval = 18 (no more files)

Hope that clears things up a bit.

Post 8000 w00t!

This post was edited on 10-31-2011 at 02:31 PM by matty.
10-31-2011 11:10 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Enumerating through files in Win32 - by SmokingCookie on 10-27-2011 at 07:54 PM
RE: [?] Enumerating through files in Win32 - by matty on 10-27-2011 at 09:31 PM
RE: [?] Enumerating through files in Win32 - by SmokingCookie on 10-29-2011 at 09:37 AM
RE: [?] Enumerating through files in Win32 - by matty on 10-31-2011 at 11:10 AM
RE: [?] Enumerating through files in Win32 - by SmokingCookie on 10-31-2011 at 02:45 PM
RE: [?] Enumerating through files in Win32 - by matty on 10-31-2011 at 02:53 PM
RE: [?] Enumerating through files in Win32 - by SmokingCookie on 10-31-2011 at 03:55 PM
RE: [?] Enumerating through files in Win32 - by matty on 10-31-2011 at 05:36 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On