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. Setup cannot continue...Setup cannot continue...

4. File types, and open specified file type

5. Continuing dilemma: splitting up PostScript file

6. (Q)File Save As Common Dialog *continued* (Ken-Help)

7. Word File|Save As dialog box.... continued

8. File Open Dialog continued...

9. "File Not Found"-(The Saga Continues)

10. writing to a text file ...continue

11. Jet Vs Random Access Files - Continued

12. VB5: Setup cannot continue because some system files are out of date

 

 
Powered by phpBB® Forum Software