. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosGetFilesInFolder(string PathName)

Returns a linear list of strings of all the file names in the specified folder that match the specified wildcard search pattern.

A wildcard search pattern is a string specifying a criterion for matching other strings. The wildcard search pattern specifies both the filename and file extension (Windows) / file type signature (MacOS). Any character matches itself only, with 2 exceptions, the ? character and the * character.
The “?” character is a wild card for matching any single character exactly, it will match any string of length 1. For example, "??x" matches "abx" but not "abcx" or "ax". The above wildcard pattern matches any string of length 3 that ends with an x.
The * character matches any string of length 0 or above. For example, 4839673"*xyz*" matches "xyz", "axyzb", "abxyz", "xyzab" and "abxyzcd" but not "xayz", "xyaz" or "xaybz". The above wild card pattern matches any string that contains the string "xyz".
The parameter PathName specifies the folder to find the files in as well as the wild card patterns for file name and file extension / file type signature. The location of the folder is given by the substring in PathName from the first character to the character directly before the last backslash on Windows or colon on MacOS. On Windows, if a backslash is not found in the path, one will be appended to the path, following the colon. On MacOS, if no colon is found, one will be appended to the end of the path. On Windows for example, "C:\WINNT\*.*" would consider "C:\WINNT" as the folder to search for files in. On MacOS for example, "My Mac:Docs:*.*" would consider "My Mac:Docs" as the folder to search for files in.
The remainder of the string after the last backslash or last colon specifies the wildcard patterns for file name and file extension / file type signature. The substring from the first character after the last backslash or colon to the character directly before the last period is the wildcard search pattern for the filename. This is case insensitive.
The substring from the first character after the last dot to the end of the string is the wild card search pattern for the file extension / file type signature. This is case insensitive on Windows but case sensitive on MacOS.
On Windows for example, "C:\WINNT\win*.?n?", "win*" would be considered the file name search pattern and "?n?" would be considered the file extension search pattern. The above example would match all files in "C:\WINNT" with a file name starting with "win" and a 3 letter file extension with n as the second character.
On MacOS file type signatures are always four letter case sensitive strings. On MacOS for example, "My Mac:Docs:mac *.???T", "mac*" would be considered the file name search pattern and "???T" would be the file type signature search pattern. The above example would match all files in "My Mac :Docs" with a file name starting with "mac" and a file type signature ending with an uppercase T.

Parameter :

PathName : A string specifying the folder to search for files in, the file name wild card pattern and the file extension / file type signature. The basic format of this parameter is "Folder\Name.Type" on Windows or "Folder:Name.Type" on MacOS where Folder is the pathname of the folder to search for files in, Name is a wildcard search pattern for the filename and Type is a wildcard search pattern for the file extension / file type signature. 

Return Value : A linear list of strings containing the names of all files within the specified folder matching the specified wild cards. If an error occurred, an empty linear list is returned, in which case dosGetLastError() should be called to determine the cause of the error. 

Possible Returned Error Codes via dosGetLastError() :
10001 : Invalid format for parameter 1. A colon in the Windows path was not found. 
10031 : The folder location specified by PathName does not exist.



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 2/18/2002 3:11:36 PM.