|
Hi Soon Yew (hope I got that correctly),
On Thu, 14 Jul 2011, Lim Soon Yew wrote:
> When I am running the built-in macro function getFileList(dir) in Window
> XP, it includes the "Thumbs.db" file generated by Window XP. But when I
> run the same macro in Window 7, it gives me the right number of files
> and does not include any "Thumbs.db" file.
Windows 7 probably marks the Thumbs.db file as hidden by default, that is
my guess. I am working around issues like these by doing something like
list = getFileList(dir);
for (i = 0; i < list.length; i++)
if (list[i] != "Thumbs.db")
...
Quite often, I already know the desired file extension, in which case I
can use something like "if (endsWith(list[i], ".png"))" instead, which is
even more specific.
Ciao,
Johannes
|