電腦中毒 隨身碟所以檔案被隱藏且不可設為可見

來源:互聯網
上載者:User

標籤:

@echo off&setlocal enableextensions enabledelayedexpansion
  title 解決檔案夾隱藏屬性無法修改的問題 批處理
  if "%~1"=="" (echo 你沒有拖入任何磁碟或檔案或檔案夾!
  echo ------
  echo 請把 要處理的磁碟或檔案或檔案夾 拖到 該批次檔表徵圖上
  echo 而不是 雙擊啟動 批處理!&pause&goto :eof)
  call:choose "設定隱藏檔案屬性,請選擇:" 不改變 去掉 設定
  (set h=)&(if !c! equ 2 set h=-)&(if !c! equ 3 set h=+)
  call:choose "設定系統檔案屬性,請選擇:" 不改變 去掉 設定
  (set s=)&(if !c! equ 2 set s=-)&(if !c! equ 3 set s=+)
  call:choose "設定應用範圍,請選擇:" 檔案或檔案夾自身屬性及第一級目錄內容屬性 檔案夾第一級目錄內容屬性
  for %%i in (%*) do (if !c! equ 1 call:attrib "%%~i"
  for /f "delims=" %%j in (‘dir /a /b "%%~i"‘) do call:attrib "%%~i\%%~j")
  pause&goto :eof
  :choose
  (set c=)&(set n=)&for %%i in (%*) do echo !n! %%~i&set /a n+=1
  (set /p c=)&(set /a c=c)&if !c! geq 0 if !c! leq !n! echo.&goto :eof
  goto choose
  :attrib
  setlocal&(set a=)&(set a=%~a1)&if "!a!"=="" goto :eof
  if not defined h if "!a:~3,1!"=="h" (set h=+) else (set h=-)
  if not defined s if "!a:~4,1!"=="s" (set s=+) else (set s=-)
  echo 正在處理: %~1&attrib !h!h !s!s "%~1"&goto :eof
  echo 修改成功!

電腦中毒 隨身碟所以檔案被隱藏且不可設為可見

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.