WSH Memo 3

'do something to all files into dropped folder mo="" Set Fs=WScript.CreateObject("Scripting.FileSystemObject") Set arg=WScript.Arguments If arg.Count=0 Then MsgBox "drop any folder" WScript.Quit end if path=arg(0) If Fs.FolderExists(path)=False Then MsgBox path & " not exists" WScript.Quit End If Set fol=Fs.GetFolder(path) Set flc=fol.Files For Each fl1 in flc If Fs.GetExtensionName(fl1.Path)="vdb" or Fs.GetExtensionName(fl1.Path)="VDB" Then mo2=fl1.DateLastModified 'mo2=fl1.Size 'MsgBox mo2,vbOk,"vdb" if StrComp(mo2,mo)=1 then mo=mo2:fi=fl1.Path End If Next For Each fl1 in flc 'If Fs.GetExtensionName(fl1.Path)="vdb" or Fs.GetExtensionName(fl1.Path)="VDB" Then if StrComp(fi,fl1.Path)<>0 then 'if MsgBox("delete "+fl1.Path+"?",vbYesNo,"vdb")=vbYes then Fs.DeleteFile(fl1.Path) 'End If End If Next msgbox "complete"
'input registry sample set w=WScript.CreateObject("WScript.Shell") m=MsgBox("okay?",vbOkCancel+vbQuestion,"sample") if m=vbOk then nam=InputBox("value") w.RegWrite "registory name",nam MsgBox "successfully" end if
–ß‚é