Source language: Translate to:

FileList command

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

FileList command

Postby edunaway » Mon Oct 16, 2006 10:27 am

Is anyone else successfully using the FileList command? I'm using NB 5.5.2a and can't get it to work.

Here is the code I am using:

FolderBox "Select a Folder:" "[Folder.To.List]"
FileList "[Folder.To.List]\*.*" "Files" "[File.List]

In my pub the [File.List] variable never gets created so it appears that the command isn't working or something is wrong with my code.

Posts: 88
Joined: Wed May 04, 2005 9:17 am

Postby Sam Cox » Mon Oct 16, 2006 10:59 am

You code works for me on Windows XP Version 2002 SP2. I verified the contents of [Folder.To.List] and [File.List] by displaying them in a Simple Text box.
User avatar
Sam Cox
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby HPW » Mon Oct 16, 2006 11:00 am

Code: Select all
FolderBox "Select a Folder:" "[Folder.To.List]"
FileList "[Folder.To.List]\*.*" "Files" "[File.List]"

Does you forget to post the closing double quote?
It works for me as expected.
User avatar
Posts: 2526
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Mon Oct 16, 2006 11:04 am

Your code seems to be working correctly, but make sure that the folder you select actually contains some files. If it only contains folders, then [File.List] will be empty because you're using the "Files" option. To display both files and folders, change your code to this:

Code: Select all
FolderBox "Select a Folder:" "[Folder.To.List]"
FileList "[Folder.To.List]\*.*" "Files+Folders" "[File.List]"
NeoSoft Support
Neosoft Support
NeoSoft Team
Posts: 5620
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby edunaway » Mon Oct 16, 2006 12:05 pm

HPW, yes, the closing quotes was a mistype on my part (NB is on another computer)

I still had trouble getting the FileList command to work and I knew the folder I was testing this with had files but I was on a deadline and I've already sent the customer the completed application by using a batch file to obtain the file list.

Of course it would be preferable to figure out what I was doing wrong with the FileList command and after tinkering a bit it finally started working, though I don't see any difference in my code. Isn't it frustrating when that happens?

Thanks for the help & quick response everyone!

Posts: 88
Joined: Wed May 04, 2005 9:17 am

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest