Filesystem Object 
Author Message
 Filesystem Object

Using the fso is there anyway I can get the description of a file (e.g. the
Desciption of a Word file, Html File, MPP File)?

Thanks In Advance,
Kevin.



Sun, 13 Jul 2003 22:08:41 GMT  
 Filesystem Object
http://msdn.microsoft.com/scripting/default.htm?/scripting/VBScript/d...
otype.htm

Function ShowFolderType(filespec)
   Dim fso, f, s
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFolder(filespec)
   s = UCase(f.Name) & " is a " & f.Type
   ShowFolderType = s
End Function


Quote:
> Using the fso is there anyway I can get the description of a file (e.g.
the
> Desciption of a Word file, Html File, MPP File)?

> Thanks In Advance,
> Kevin.



Sun, 13 Jul 2003 23:47:09 GMT  
 Filesystem Object
The only trick I have found with this is that the description is different
depending on the software installed.
e.g. a .doc file description is different if Word is installed or not (if
not it is the wordpad registered description). This can be a trap if you
move your code to another server that does or doesn't have office installed.

Regards,
Ian
WSH FAQ www.windows-script.com


http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/d...

Quote:
> otype.htm

> Function ShowFolderType(filespec)
>    Dim fso, f, s
>    Set fso = CreateObject("Scripting.FileSystemObject")
>    Set f = fso.GetFolder(filespec)
>    s = UCase(f.Name) & " is a " & f.Type
>    ShowFolderType = s
> End Function



> > Using the fso is there anyway I can get the description of a file (e.g.
> the
> > Desciption of a Word file, Html File, MPP File)?

> > Thanks In Advance,
> > Kevin.



Mon, 14 Jul 2003 20:42:38 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. performance of FileSystem-object

2. FSO (FileSystem object)

3. FileSystem Object Read Order

4. filesystem object

5. Problem with filesystem object

6. Filesystem Object

7. Filesystem object UNC Path Error

8. Problems with Filesystem object Copy method

9. FileSystem Object

10. Filesystem object

11. GetFolder method for FileSystem Object not working on Win2000

12. FileSystem Object Network Path Error

 

 
Powered by phpBB® Forum Software