file type continue 
Author Message
 file type continue

Thank for your help , Michael. however, There is not what i want. I have
tried out  your script, however, it only display "*.txt".

What i want is how to just to display the EACH INDIVIDUAL extension name.
let say
in a folder contains : 3 txt document, 5 HTML document and 2 JPEG image. So
all together there are 10 files.
Out of 10 there are only 3 types of files which are : TXT, HTML, JPEG. So
what i want to display is just these 3 type of files (TXT, HTML, JPEG). So
the MSGBOX will display like

 In this folder there are 3 types of files which are :
    1. text document
     2. HTML document
    3. JPEG Image

not

 In this folder there are 3 types of files which are :
    1. text document            4. HTML document         7. HTML document
10. JPEG Image
     2. text document           5. HTML document         8. HTML document
    3. text document            6. HTML document         9. JPEG Image

thnak you



Mon, 27 Jan 2003 03:00:00 GMT  
 file type continue

set fso = createobject("scripting.filesystemobject")
Set dict = CreateObject("Scripting.Dictionary")
dict.comparemode = vbtextcompare

path = "c:\winnt"

set fo = fso.getfolder(path)

for each fi in fo.files
  typ = fi.type
  if dict.exists(typ) then
    dict(typ) = dict(typ) + 1
  else
    dict(typ) = 1
  end if
next

for each k in dict.keys
  s = s & dict(k) & " ==> " & k & vbcrlf
next

msgbox s

--
Michael Harris
MVP Scripting

Thank for your help , Michael. however, There is not what i want. I have
tried out  your script, however, it only display "*.txt".

What i want is how to just to display the EACH INDIVIDUAL extension name.
let say
in a folder contains : 3 txt document, 5 HTML document and 2 JPEG image. So
all together there are 10 files.
Out of 10 there are only 3 types of files which are : TXT, HTML, JPEG. So
what i want to display is just these 3 type of files (TXT, HTML, JPEG). So
the MSGBOX will display like

 In this folder there are 3 types of files which are :
    1. text document
     2. HTML document
    3. JPEG Image

not

 In this folder there are 3 types of files which are :
    1. text document            4. HTML document         7. HTML document
10. JPEG Image
     2. text document           5. HTML document         8. HTML document
    3. text document            6. HTML document         9. JPEG Image

thnak you



Mon, 27 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. file type continue

2. file type continue

3. Continuing dilemma: splitting up PostScript file

4. Type 1 vs. Type 3 Font Files

5. type 1, type 2?, type 3 ps fonts

6. Display Filed Description, Filed Data Type on ASP Page

7. Input Type File, Remote Scripting, File transfers

8. Input type file - file size

9. Display Filed Description, Filed Data Type on ASP Page

10. Win32Scripting Site Redesign... (Continued Evolution)

11. color seperations continued

12. Win32Scripting Site Redesign... (Continued Evolution)

 

 
Powered by phpBB® Forum Software