至此 终于结贴了。。谢谢各位的帮助 特别是寒星
这里发一个成品 谢谢大家 可以测试下 一切操作可逆 不会影响电脑 图片可以自己添加 推荐使用 快速 版本
这里就把成品给大家发出来
下载链接
http://www.uushare.com/user/gkass/file/2909732
下面是附件说明-
- 运行文件夹里的 !)生成.bat 即可在全盘文件夹里显示图片
- 运行过程切勿关闭运行窗口。
- 一切操作都是可逆的。
-
- 当不想要显示图片的时候 再运行一次 !)生成.bat 或者 !)删除.bat 即可
- 至于 !)快速.bat 是后面添加的 只搜索到1层目录
- 速度当然会很快 而且对系统的稳定不会有影响了
复制代码 华丽的分割线。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
===============================================================================================
下面贴上成品的批处理内容-
- !)快速.bat
-
- @echo off&setlocal enabledelayedexpansion
- if exist "勿删.txt" (goto back) else (goto start)
-
- :back
- cls
- echo 现在开始删除生成的文件,操作期间一定不要关闭本窗口。
- echo 如本机文件夹过多的话,操作的时间就会较长,请耐心等待。谢谢!
- for /f "delims=" %%a in (勿删.txt) do if exist "%%a"desktop.ini del /f /a /q "%%a"desktop.ini & attrib -s %%a
- for /f "delims=" %%i in (勿删.txt) do if exist %%i\desktop.ini del /f /a /q %%i\desktop.ini & attrib -s %%i
- del /f /q /a 勿删.txt
- goto xing
- :start
- cls
- echo 如本机文件夹过多的话,操作的时间就会较长,请耐心等待。谢谢!
- for /f "skip=4" %%a in ('mountvol ^| find ":"') do if not exist %%a\desktop.ini echo %%a>>勿删.txt
- for /f "skip=4" %%i in ('mountvol ^| find ":"') do (for /f "delims=" %%j in ('dir /b /ad "%%i" 2^>nul') do if not exist %%i\desktop.ini echo "%%i%%j">>勿删.txt)
- for /f "delims=" %%i in ('dir /a /b /s "*.PNG"') do call:han "%%~fi"
- for /F "tokens=1,2* delims==:" %%i in ('set han_^|findstr /n .*') do set "BG_%%i=%%k"&set ye_BG=%%i
-
- for /f "delims=" %%i in (勿删.txt) do set "xing_%%~i=="
- for /F "tokens=1,2* delims==:_" %%i in ('set xing_^|findstr /n .*') do set a=%%k&set "Fl_%%i=!a:~0,-2!"&set ye_Fl=%%i
- for /l %%i in (1,%ye_BG%,%ye_Fl%) do for /l %%j in (1,1,%ye_BG%) do set/a "gu=%%i-1+%%j"&call set "gu=%%Fl_!gu!%%"&if not defined gu (goto :xing) else (attrib +s "!gu!"
- >>"!gu!\Desktop.ini" echo.[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
- >>"!gu!\Desktop.ini" echo.IconArea_Image=!BG_%%j!
- attrib +s +h +r "!gu!\Desktop.ini"
- )
-
- :xing
- exit
-
- :han
- set han=%random%%random%%random%
- if "!han_%han%!"=="" (set "han_%han%=%~1") else goto:han
复制代码
-
- !)生成.bat
-
- @echo off&setlocal enabledelayedexpansion
- if exist "勿删.txt" (goto back) else (goto start)
-
- :back
- cls
- echo 现在开始删除生成的文件,操作期间一定不要关闭本窗口。
- echo 如本机文件夹过多的话,操作的时间就会较长,请耐心等待。谢谢!
- for /f "delims=" %%a in (勿删.txt) do if exist "%%a"desktop.ini del /f /a /q "%%a"desktop.ini & attrib -s %%a
- for /f "delims=" %%i in (勿删.txt) do if exist %%i\desktop.ini del /f /a /q %%i\desktop.ini & attrib -s %%i
- del /f /q /a 勿删.txt
- goto xing
- :start
- cls
- echo 如本机文件夹过多的话,操作的时间就会较长,请耐心等待。谢谢!
- for /f "skip=4" %%a in ('mountvol ^| find ":"') do if not exist %%a\desktop.ini echo %%a>>勿删.txt
- for /f "skip=4" %%i in ('mountvol ^| find ":"') do (for /f "delims=" %%j in ('dir /s /b /ad "%%i" 2^>nul') do if not exist %%j\desktop.ini echo "%%j">>勿删.txt)
- for /f "delims=" %%i in ('dir /a /b /s "*.PNG"') do call:han "%%~fi"
- for /F "tokens=1,2* delims==:" %%i in ('set han_^|findstr /n .*') do set "BG_%%i=%%k"&set ye_BG=%%i
-
- for /f "delims=" %%i in (勿删.txt) do set "xing_%%~i=="
- for /F "tokens=1,2* delims==:_" %%i in ('set xing_^|findstr /n .*') do set a=%%k&set "Fl_%%i=!a:~0,-2!"&set ye_Fl=%%i
- for /l %%i in (1,%ye_BG%,%ye_Fl%) do for /l %%j in (1,1,%ye_BG%) do set/a "gu=%%i-1+%%j"&call set "gu=%%Fl_!gu!%%"&if not defined gu (goto :xing) else (attrib +s "!gu!"
- >>"!gu!\Desktop.ini" echo.[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
- >>"!gu!\Desktop.ini" echo.IconArea_Image=!BG_%%j!
- attrib +s +h +r "!gu!\Desktop.ini"
- )
-
- :xing
- exit
-
- :han
- set han=%random%%random%%random%
- if "!han_%han%!"=="" (set "han_%han%=%~1") else goto:han
复制代码
-
- !)删除.bat
-
- @echo off&setlocal enabledelayedexpansion
- echo 如本机文件夹过多的话,操作的时间就会较长,请耐心等待。谢谢!
- echo 显示的错误也属于正常的,不必担心本操作失误造成系统出现问题。
- echo 运行窗口一定不要关闭,切记。
- del /f /q /a 勿删.txt >nul 2>nul
- for /f "skip=4" %%a in ('mountvol ^| find ":"') do for /f "tokens=*" %%i in ('dir /s /ashr /b "%%a"desktop.ini') do echo %%~dpi>>勿删.txt
- for /f "delims=" %%a in (勿删.txt) do if exist "%%a"desktop.ini del /f /a /q "%%a"desktop.ini & attrib -s %%a
- for /f "delims=" %%i in (勿删.txt) do if exist %%i\desktop.ini del /f /a /q %%i\desktop.ini & attrib -s %%i
- del /f /q /a 勿删.txt
- exit
复制代码
[ 本帖最后由 hmlstfqtl 于 2010-4-23 08:44 编辑 ] |