⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 在所有文件夹下建立随机文件.bat

📁 namejm写的批处理
💻 BAT
字号:
@echo off
:: 在每个文件夹下建立一个 随机数-fly-随机数.txt 的文本
:: code by jm 2006-9-17 CMD@XP
cd.>list.txt
set current_dir=%cd%
setlocal enabledelayedexpansion
for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do (
    set var=%%i
    set drive=!var:~-2!
    fsutil fsinfo drivetype !drive!|find "固定">nul && call :creat !drive!
)
pause
goto :eof

:creat
cd /d %1\
for /r %%i in (.) do (
    set root=%%i
    set root=!root:~0,-2!
    call :random_
    echo !root!\!num1!-fly-!num2!.txt>>"%current_dir%\list.txt"
)
endlocal
goto :eof

:random_
set num1=%random%
set num2=%random%
goto :eof

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -