- dim ws,fs,current_path_files,current_path_subfolders,att,files_sum,subfolders_sum
- 'on error resume next
-
- set ws=wscript.createobject("wscript.shell")
- set fs=wscript.createobject("scripting.filesystemobject")
-
- set current_path_files=fs.getfolder(ws.CurrentDirectory).files
- set current_path_subfolders=fs.getfolder(ws.CurrentDirectory).subfolders
- '==========================================================================
- for each file in current_path_files
- 'ignore the shortcut and link
- att=file.attributes
- if att=4+2 or att=4+2+1 or att=4+2+32 or att=4+2+32+1 then
- files_sum=files_sum & file.name & vbnewline
- end if
- next
-
- for each subfolder in current_path_subfolders
- 'ignore the shortcut and link
- att=subfolder.attributes
- if att=4+2 or att=4+2+16 or att=4+2+16+1 then
- subfolders_sum=subfolders_sum & subfolder.name & vbnewline
- end if
- next
- '==========================================================================
- if files_sum <> "" then
- msgbox files_sum,,"Exist Hide and System file(s):"
- end if
-
- if subfolders_sum <> "" then
- msgbox subfolders_sum,,"Exist Hide and System folder(s):"
- end if
复制代码
|