复制代码
- @echo off
- (echo,Windows Registry Editor Version 5.00
- echo/
- echo,[-HKEY_CURRENT_USER\Software\name]
- )>"%~dp0\执行完成后自动删除.reg"
- for /f "delims=" %%i in ('type "%~dp0\1.txt"') do (
- reg.exe add "hkcu\software\name\%%i" /f
- )
- for /f "delims=" %%i in ('reg.exe query "hkcu\software\name"') do (
- reg.exe query "%%i" >nul 2>nul&&(
- (echo=%%~nxi)>>"%~dp0\1_new.txt"
- reg.exe delete "%%i" /va /f
- )
- )
- timeout/t 1
- regedit.exe /s "%~dp0\执行完成后自动删除.reg"&&del/f/q "%~dp0\执行完成后自动删除.reg"
- pause
复制代码
- @echo off
- rd/s/q "%~dp0\name" 2>nul
- for /f "delims=" %%i in ('type "%~dp0\1.txt"') do (
- for /f "tokens=1,* delims=:" %%j in ("%%i") do (
- if "%%k"=="**" (
- md "%~dp0\name\%%~nxj.bathome"
- ) else (
- md "%~dp0\name\%%~nxj"
- )
- )
- )
- (for /f "delims=" %%i in ('dir/ad/b/l/on "%~dp0\name\"') do (
- if /i "%%~xi"==".bathome" (
- echo,%%~ni::**
- ) else (
- echo,%%~ni
- )
- )
- )>1_new.txt
- rd/s/q "%~dp0\name" 2>nul
- pause
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |