DOCUMENT:Q189751 21-JUL-1998 [vbwin] TITLE :INFO: Limitations of the FileSystemObject PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- SUMMARY ======= This article describes the limitations of the FileSystemObject stored in the Microsoft Scripting Runtime file, scrrun.dll. For more information about the FileSystemObject, see the appropriate topics in the Visual Basic documentation. MORE INFORMATION ================ - Reads only ASCII data - while the FileSystemObject can create an ASCII or Unicode text file, the FileSystemObject can only read ASCII text files. - Forward reading line-by-line - the FileSystemObject reads a text file in one direction: from the beginning to the end of the text file. Further, the FileSystemObject only reads line-by-line. If you need to go back to a previous line, then you must return to the beginning of the file and read forward to the required line. - Cannot open a file for simultaneous reading and writing - you can open a file for reading by using the ForReading IOMode parameter of the OpenTextFile method. However, if you want to modify the file, you must reopen the file for appending or writing and then open a textstream object to make your file modifications. - Cannot search for file names using wildcards - the FileSystemObject can only retrieve a specified file using the GetFile method. You cannot use wildcard characters in the filespec parameter of the GetFile method. - Cannot return the file version number - the File object in the Files collection of the FileSystemObject can return several file properties. However, there is no version property. Use the GetFileVersionInfo Windows API function to get a file's version information. - Cannot sort file names from the files collection - you can iterate through the File objects in the Files collection to obtain a list of the files in a folder. However, the File objects are not sorted. You need to use a sort routine to sort the File objects in the Files collection. REFERENCES ========== For additional information, please see the following articles in the Microsoft Knowledge Base: ARTICLE-ID: Q185476 TITLE : HOWTO: Search Directories to Find or List Files ARTICLE-ID: Q185601 TITLE : HOWTO: Recursively Search Directories Using FileSystemObject ARTICLE-ID: Q186118 TITLE : HOWTO: Use FileSystemObject with Visual Basic Additional query words: kbDSupport kbDSD kbVBp500 kbVBp kbNoKeyWord ====================================================================== Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbinfo ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.