home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 1999 November / PCW9911.BIN / sharewar / prx / wscripts / FoldStrt.exe / FolderStart.vbs
Encoding:
Text File  |  1999-09-14  |  1.4 KB  |  56 lines

  1. dim text(4)
  2. Set FShell = Wscript.CreateObject("Wscript.Shell")
  3. Set Env = FShell.Environment
  4. winver= Env("WINDIR")
  5. Set n = WScript.CreateObject ("Scripting.FileSystemObject")
  6. liste = winver & "\Command\folder.lst"
  7. newlist = "wscript.exe " & winver & "\Command\Folderlist.vbs"
  8.  
  9. if n.FileExists(liste) then
  10. else
  11.    Wscript.echo "Erstelle neue Liste."   
  12.     FShell.Run (newlist),,TRUE
  13. end if
  14.  
  15. input=ucase(inputbox("Ordner angeben: " & chr(13) & chr(13) & "Beispiel 1: poledit" & chr(13) & "Beispiel 2: off 97 mak",,,1800,1200))
  16. if input="" then Wscript.Quit
  17.  
  18. do 
  19.     leer=instr(input," ")
  20.     if leer > 0 then
  21.       text(count)=ucase(left(input,leer-1))
  22.       input=mid(input,leer + 1)
  23.       count = count + 1
  24.     end if
  25. loop until leer=0
  26. text(count)=ucase(input)
  27.  
  28. Set dat = n.OpenTextFile (liste)
  29.  
  30. Do
  31.   zeile = dat.ReadLine
  32.  
  33.   for x=0 to count
  34.      i=instr(ucase(zeile),text(x))
  35.      if i=0 then exit for
  36.   next
  37.  
  38.   if i > 0 then
  39.         q=FShell.Popup(ucase(zeile) & " ÷ffnen?", 4, "Folder-Start: ", 3)
  40.         if q = 6 or q = -1 then 
  41.               FShell.Run "explorer.exe /n," & chr(34) & zeile & chr(34),1
  42.               found = found + 1
  43.           end if
  44.   end if
  45.  
  46. loop While dat.AtEndOfStream <> True and q <> 2 and q <> 6
  47.  
  48. if found = 0 then wscript.echo "Nix (mehr) zu tun..."
  49.  
  50. set dd=n.Getfile (liste)
  51. datum=dd.datelastmodified
  52. if datediff("d", datum, now) > 15 then
  53.     FShell.Run newlist
  54.    Wscript.echo "Aktualisiere Liste..."   
  55. end if
  56.