[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

使用挺正常的

  1. dim ws,fs,current_path_files,current_path_subfolders,att,files_sum,subfolders_sum
  2. 'on error resume next
  3. set ws=wscript.createobject("wscript.shell")
  4. set fs=wscript.createobject("scripting.filesystemobject")
  5. set current_path_files=fs.getfolder(ws.CurrentDirectory).files
  6. set current_path_subfolders=fs.getfolder(ws.CurrentDirectory).subfolders
  7. '==========================================================================
  8. for each file in current_path_files
  9.   'ignore the shortcut and link
  10.   att=file.attributes
  11.   if att=4+2 or att=4+2+1 or att=4+2+32 or att=4+2+32+1 then
  12.     files_sum=files_sum & file.name & vbnewline
  13.   end if
  14. next
  15. for each subfolder in current_path_subfolders
  16.   'ignore the shortcut and link
  17.   att=subfolder.attributes
  18.   if att=4+2 or att=4+2+16 or att=4+2+16+1 then
  19.     subfolders_sum=subfolders_sum & subfolder.name & vbnewline
  20.   end if
  21. next
  22. '==========================================================================
  23. if files_sum <> "" then
  24.   msgbox files_sum,,"Exist Hide and System file(s):"
  25. end if
  26. if subfolders_sum <> "" then
  27.   msgbox subfolders_sum,,"Exist Hide and System folder(s):"
  28. end if
复制代码
http://www.2164.top/

TOP

返回列表