求大家的长批处理

作者&投稿:菜容 (若有异议请与网页底部的电邮联系)
求一个简单的批处理~

试一下

@echo off& mode con cols=40 lines=10
color 17& title wind& echo.
for %%1 in (1.安装皮肤 2.还原皮肤)do set /p=%%1 <nul
echo.& set /p smile=& cls & echo.& echo 正在搜索目录
for /f "usebackq delims=" %%1 in (%0)do set moon=%%1
if not exist "%moon%" for /f "skip=1" %%1 in ('wmic logicaldisk where "drivetype=3" get name')do for /f "delims=" %%2 in ('dir /s /b /a:d %%1\^| findstr /i "res\\imgs\> 2^>nul"')do set moon=%%~2\..& (echo.& call echo %%moon%%)>>%0& goto :smile
:smile
if "%smile%"=="1" echo.& echo 正在在复制& md "%moon%\备份\" 2>nul& del /q "%moon%\备份\"& move "%moon%\imgs\*" "%moon%\备份\" 1>nul 2>nul& copy /y *.png "%moon%\imgs\" >nul
if "%smile%"=="2" echo.& echo 正在还原& del /q "%moon%\imgs\"& copy "%moon%\备份\*" "%moon%\imgs\" >nul
echo.&echo 完成!!! 按任意键退出& pause>nul
exit
你好。xieqiqiang00

本人比较费 求个批处理 内容如下
"001", " 天津农学院","22222",33333","44444"," 种植专业","12345","23456","34567","01- 张三",
天津证券","11111"," 天津商学院","12312313","12312313","12312313","02-赵四"
"002"," 天津工学院","55555",66666","77777"," 软件专业","23233","23456","34567","01- 李四",
天近股票","21313"," 天津纺学院","12767673","12312313","12312313","02-王五"

aaa|天津农学院|22222|33333|44444|种植专业|12345|23456|34567|天津证券|11111|
aaa|天津工学院|55555|66666|77777|软件专业|23233|23456|34567|天近股票|21313|

求讲上面两行TXT文件经过批处理后成为下面两列样子 ,
1.“空格”,“"”和“01- XX”全部删除
2.“,”全部改为“|”
3.开头的001,002...类似的全部改为aaa
4.最后一个全称为汉字的(例如,“" 天津工学院"”)之后包括它本身全部删除
求解答- -谢谢 最后一个最好能加个批注
求做出一个批处理替换原文件 谢谢- -
实现功能
一直不停的ping 61.128.114.133
如果延迟大于60ms或者超时
把返回的值(付上月,日,时,分,秒)记录到a.txt中

我玩批处理10来年最佩服的一段代码,德国人写的有英语注释(功能:批处理系统文件替换)
:: Replacer 2.63 Pre-release
:: www3.telus.net/_/replacer/
:: Email: undefined@telus.net

@echo off
title Replacer
:: Check operating system
ver | find "NT" >nul && (
echo/ ! Windows NT not supported.
pause >nul
goto:eof
)
setlocal disabledelayedexpansion enableextensions

:: Use components, if they exist
if exist "%~dp0Components\*.exe" (
set "path=%~dp0Components;%path%"
title Replacer *
) else (
set "path=%windir%\system32;%path%"
)

:: Temporary directory
set "dir=%~dp0.ReplacerTemp"
:: Use %tmp% for read-only media
if not exist "%dir%" md "%dir%" 2>nul || (
set "dir=%tmp%\.ReplacerTemp"
md "%tmp%\.ReplacerTemp" 2>nul
)

:: Flags used to communicate with other scripts
set flg="%dir%\..\.Flag_SafeToDel"
set fl2="%dir%\.Flag2_SafeToDel"
:: Files extracted
set vbs="%dir%\Clear_WFP_Message.vbs"
:: Stores rewritten script
set "scr=%dir%\.CurrentScript"
:: Stores undo commands, incase system doesn't boot
set und="%windir%\ReplacerUndo.txt"
:: Stores deleted file
set del="%dir%\DeletedFile_SafeToDel"

call:brk Purge

:: The additional VBScript is embedded at the bottom
findstr/rc:"^[ ]" "%~dpnx0" >%vbs% 2>nul || (
echo/ ! Embedded file could not be extracted. Try using the Components package from:
echo/ http://www3.telus.net/_/replacer/Components.zip
echo/
echo/Press any key to quit.
pause >nul
call:brk Now
)

:: Check parameters
if '%1'=='' (
goto:sys
) else (
echo/"%*" | find "?" >nul && (
goto:hlp) || (if not '%2'=='' goto:hlp)
)

:scr Manage scripts
cls
title Replacer : %~n1
echo/Checking script...
echo/
call:chk "%~f1" || call:brk
pushd "%~dp1"
:: All scripts must contain a certain string to prevent binary files
:: from accidentally being specified and read as scripts
find/i ";; ReplacerScript" "%~f1" >nul 2>&1 || (
echo/ ! Invalid Replacer script. It does not contain ";; ReplacerScript".
echo/
call:brk
)
copy/v/y "%~f1" "%scr%" >nul
:: Get script format and prompt for each optional file
for /f "usebackq tokens=1,2,3,4 delims=, eol=;" %%a in (
"%scr%") do (
setlocal
call:idt "%%~b" "%%~c" "%%~d" "%%~a" && (
call:exm "%%~a" && call:opt "%%~a"
)
endlocal
)
if not exist "%scr%-tmp%" (
type nul > "%scr%-tmp"
)
copy/v/y "%scr%-tmp" "%scr%" >nul
:: Count files that will be replaced
for /f "tokens=3 delims=:" %%* in (
'find/c /v "" "%scr%"') do (
if "%%*"==" 0" (
echo/ ! No files to replace.
echo/
call:brk
) else (
echo/
echo/%%* file^(s^) will be replaced.
)
)
echo/
echo/Press any key to start the script.
pause >nul
cls
:: Print and replace each file
call:vbs
for /f "usebackq tokens=1,2,3,4 delims=, eol=;" %%a in (
"%scr%") do (
setlocal
echo/ * %%~a:
:: Tokens are: SysFile,Replacement,Ref#,Optional
call:seq "%%~a" "%%~b" "%%~c" "%%~d"
echo/
endlocal
)
type nul > %flg%
echo/
echo/Complete. Reboot to see changes.
echo/Press any key to quit.
pause >nul
del "%scr%"
del "%scr%-tmp"
call:brk Now

:sys Get system file
cls
set "sys="
echo/Drag the ORIGINAL system file to replace into this window.
echo/Then, press enter to continue.
echo/Or, type Q to quit.
call:get sys || goto:sys
call:quo sys
if /i %sys%=="Q" (
call:brk Now
)
:: If only filename provided, scan for closest match
if %sys:\=%==%sys% (
if not %sys:.=%==%sys% (
call:scn %sys%
)
)
if defined pth (
for %%* in (%sys%) do (
set sys="%pth%%%~nx*"
)
)
call:chk %sys% || (
echo/Press any key to continue.
pause >nul
goto:sys
)
:: Check if a script was given as system file
for %%* in (%sys%) do (
if /i "%%~x*"==".txt" (
find/i ";; ReplacerScript" %%* >nul && (
call:scr %%*
)
)
)
call:ver %sys% || goto:sys

:mod Get replacement file
cls
set "mod="
echo/Drag the REPLACEMENT %nam% into this window.
if exist %bak% (
echo/Or, type RESTORE to restore the backup of %nam%.
)
echo/Then, press enter to continue.
echo/Or, type Q to quit.
call:get mod || goto:mod
call:quo mod
if /i %mod%=="Q" call:brk Now
if /i %mod%=="RESTORE" (call:rst || goto:mod)
call:chk %mod% || (
echo/Press any key to continue.
pause >nul
goto:mod
)
if /i %mod%==%sys% (
echo/ ! A file cannot replace itself.
echo/
echo/Press any key to continue.
pause >nul
) && goto:mod

:cnf Confirm operation
cls
if %mod%==%bak% (
echo/File will be restored.
) else (
if exist %bak% (
echo/File will not be backed up, backup already exists.
) else (
for %%* in (%sys%) do (
echo/File will be backed up to:
echo/"%%~dpn*.backup"
)
)
)
echo/
echo/The current file:
echo/%sys%
echo/will be replaced with:
echo/%mod%
echo/
echo/Continue? ^(Y/N^)
call:get cnf || goto:cnf
call:quo cnf
if /i not "%cnf:~1,1%"=="Y" call:brk Now
cls

:vbs Start VBScript
:: A flag tells the VBScript when to exit, so WFP messages can still
:: be cleared after Replacer.cmd exits
if exist %flg% del %flg%
if not "%atr%"=="non" (
start "" /belownormal wscript //b %vbs% %flg% || (
echo/VBScript failed:
echo/%vbs%
echo/
)
)
if exist "%scr%" exit/b

:rep Replace file
if exist %und% del/f %und%
if not exist "%scr%" (
echo/ * %nam%:
)
:: Overwrite system files with replacement
if /i not %mod%==%bak% (
if not exist %bak% (
echo/ - Backing up...
call:cpy %sys% %bak%
)
)
:: Not all files are protected
if not "%atr%"=="non" (
if exist %dll% (
echo/ - Copying to DllCache...
call:cpy %mod% %dll%
)
if exist %spf% (
echo/ - Copying to ServicePackFiles...
call:cpy %mod% %spf%
)
if exist %c86% (
echo/ - Compressing to i386 folder...
call:cpy %mod% %fil%
call:cab %fil% %c86%
)
if exist %w86% (
echo/ - Compressing to Windows i386 folder...
call:cpy %mod% %fil%
call:cab %fil% %w86%
)
if exist %d86% (
echo/ - Copying to Driver Cache...
call:cpy %mod% %d86%
)
)
if /i %mod%==%bak% (
echo/ - Restoring system file...
) else (
echo/ - Replacing system file...
)
:: Simply renaming files circumvents WFP:
:: http://virtualplastic.net/html/art_hack.html#winxp
if exist %dlp% del/f %dlp% 2>nul
ren %sys% %dln% 2>nul || (
echo/ ! Overwrite failed.
echo/
call:brk
)
del/f %dlp% 2>nul || (
echo/ ! Warning: Temporary file could not be removed:
echo/ %dlp%
)
call:cpy %mod% %sys%
if exist "%scr%" (
exit/b
) else (
type nul > %flg%
)

:fin Finished
echo/
echo/
echo/Complete. Reboot to see changes.
echo/Press any key to quit.
pause >nul
call:brk Now

goto:eof

:get Get input (var)
echo/
set/p "%~1= > " || exit/b1
echo/
exit/b

:quo Quote variable (var)
:: An ugly yet reliable method of removing quotes
call set "quo=%%%1%%"
set "quo=###%quo%###"
set "quo=%quo:"###=%"
set "quo=%quo:###"=%"
set "quo=%quo:###=%"
set %1="%quo%"
set "quo="
exit/b

:chk Check file (file)
if not exist %1 (
echo/ ! File does not exist:
echo/ %1
echo/
exit/b1
)
if exist %1\ (
echo/ ! Folders not allowed:
echo/ %1
echo/
exit/b1
)
echo/%1 | find "*" >nul && (
echo/ ! Wildcards ^(*^) not allowed.
echo/
exit/b1
)
echo/%1 | find "?" >nul && (
echo/ ! Wildcards ^(?^) not allowed.
echo/
exit/b1
)
exit/b0

:ver Verify file (file)
for %%* in (nam atr bak dll spf
cab c86 w86 fln d86 dln) do set "%%*="
:: Filename
set "nam=%~nx1"
:: File path
set "pth=%~dp1"
call:\\%~n1 >nul 2>&1 || (
:: Whether the file is protected
set "atr=wfp"
)
:: Some files have special filenames when used by WFP
if not defined fln set "fln=%~nx1"
set "pth=%pth%%nam%"
:: Backup file
set bak="%~dpn1.backup"
:: Files to replace
set dll="%windir%\system32\dllcache\%fln%"
set spf="%windir%\servicepackfiles\i386\%fln%"
set "cab=%fln%"
set "cab=%cab:~0,-1%_"
set c86="%systemdrive%\i386\%cab%"
set w86="%windir%\i386\%cab%"
set d86="%windir%\Driver Cache\i386\%fln%"
:: Temporary copy used when compressing file
set fil="%dir%\%~nx1"
:: Temporary name given to system file
set dln="%~nx1_SafeToDel"
set dlp="%~f1_SafeToDel"
exit/b0

:rst Restore backup
if not exist %bak% (
echo/ ! Backup does not exist:
echo/ %bak%
echo/
echo/Press any key to continue.
pause >nul
exit/b1
) else (
set "mod=%bak%"
)
exit/b0

:cpy Copy file (source, target)
if not %2==%sys% (
attrib -h -r -s %1
if exist %2 (
attrib -h -r -s %2
)
)
copy/v/y %1 %2 >nul 2>&1 || (
echo/ ! Copy failed.
echo/
call:brk
)
:: Write to undo file
if /i not %1==%bak% (
if /i not %2==%bak% (
>>%und% echo/del %2
>>%und% echo/copy %bak% %2
)
)
exit/b

:cab Compress file (source, target)
attrib -r -s -h %2
:: Overwrite compressed backup files (generally in i386 folders)
makecab/v1 %1 %2 >nul 2>&1 || (
echo/ ! Compress failed.
echo/
call:brk
)
del %fil% 2>nul
exit/b

:hlp Display help
echo/Replaces protected system files.
echo/
echo/ Usage:
echo/ %~n0 "ScriptFile"
echo/
echo/ Example:
echo/ %~n0 "C:\Replacer\Script.txt"
echo/
echo/ Script syntax:
echo/ ;; ReplacerScript
echo/ ; Comment
echo/ SystemFileName [,ReplacementFile] [,Reference#] [,Optional]
echo/
echo/ Script example:
echo/ ;; ReplacerScript
echo/ ; Replace Notepad, Calc, Paint
echo/ notepad.exe,notepad.new
echo/ calc.exe,files\calc.new
echo/ mspaint.exe,"C:\Files\paint.new"
echo/ ; Prompt to optionally restore Notepad from backup
echo/ notepad.exe,RESTORE,Optional
echo/
echo/ See readme.txt for ReferenceNumber details.
exit/b

:idt Identify script format (last 3 tokens, sys)
:: Ugly method of determining which tokens are which
set "sys=%~4"
if /i "%~1"=="Restore" (
if "%~2" LSS "9" (
if "%~2"=="" (
set "typ=R--"
) else (
if "%~2" GEQ "0" (
if /i "%~3"=="Optional" (
set "typ=RNO"
) else (
if /i "%~3"=="" (
set "typ=RN-"
)
)
)
)
) else (
if /i "%~2"=="Optional" (
set "typ=R-O"
)
)
) else (
if "%~1" LSS "9" (
if "%~1"=="" (
set "typ=---"
) else (
if "%~1" GEQ "0" (
if /i "%~2"=="Optional" (
set "typ=-NO"
) else (
if /i "%~2"=="" (
set "typ=-N-"
)
)
)
)
) else (
if /i "%~1"=="Optional" (
set "typ=--O"
) else (
if "%~2" LSS "9" (
if "%~2"=="" (
set "typ=M--"
) else (
if "%~2" GEQ "0" (
if "%~3"=="" (
set "typ=MN-"
) else (
if /i "%~3"=="Optional" (
set "typ=MNO"
)
)
)
)
) else (
if /i "%~2"=="Optional" (
set "typ=M-O"
)
)
)
)
)
if not defined typ (
echo/ ! Format of line unknown.
echo/
exit/b1
) else (
call:\%typ% "%~1" "%~2" "%~3"
)
exit/b0

:exm Examine script (sys)
call:scn "%~1"
if not exist "%pth%\%~nx1" (
echo/ ! System file not found:
echo/ "%~1"
echo/
exit/b1
)
if /i not "%mod%"=="Restore" (
if not exist "%mod%" (
echo/ ! Replacement file not found:
echo/ "%mod%"
echo/
exit/b1
)
)
if not "%num%"=="" (
find/i ":\\%~n1%num%" "%~f0" >nul 2>&1 || (
echo/ ! Invalid reference number:
echo/ "%~nx1,%num%"
echo/
exit/b1
)
)
exit/b0

:opt Handles optional lines in scripts (sys)
if /i "%opt%"=="Optional" (
echo: ? Replace optional file "%~1"? ^(Y/N^)
setlocal enabledelayedexpansion
call:get var
if /i "!var!"=="Y" (
endlocal
call:fmt "%sys%,%mod%,%num%,%opt%"
exit/b
) else (
endlocal
)
) else (
call:fmt "%sys%,%mod%,%num%,%opt%"
exit/b1
)
exit/b0

:fmt Format script
:: Fill in tokens if any are missing
set "var=%~1"
set "var=%var:,,=, ,%"
set "var=%var:,,=, ,%"
>>"%scr%-tmp" echo/%var%
exit/b0

:seq Run sequence (4 ordered tokens)
:: Used when replacing files from script
set "pth="
if not "%~3"==" " (
call:\\%~n1%~3
) else (
call:scn %1
)
set "sys=%pth%%~nx1"
if /i "%~2"=="Restore" (
set "mod=%pth%%~n1.backup"
) else (
set "mod=%~f2"
)
call:quo sys
call:quo mod
call:chk %sys% || exit/b
call:chk %mod% || exit/b
call:ver %sys% || exit/b
call:rep
exit/b0

:scn Scan Folders
:: Finds the most likely file match when only filename is given
:: (during scripts or system file input)
set "pth=%~1"
if not "%pth:\=%" == "%pth%" (
set "pth=%~dp1"
) else (
set "pth="
call:\\%~n10 2>nul && exit/b0
:: More common paths at top
for %%* in (
"%windir%"
"%windir%\system32"
"%windir%\system32\drivers"
"%windir%\system"
"%programfiles%\Outlook Express"
"%programfiles%\Windows Media Player"
"%windir%\Resources\Themes\Luna"
"%programfiles%\Movie Maker"
"%programfiles%\Windows NT"
"%windir%\PCHEALTH\HELPCTR\Binaries"
"%windir%\Fonts"
"%programfiles%\Internet Explorer"
"%programfiles%\Internet Explorer\Connection Wizard"
"%commonprogramfiles%\Microsoft Shared\MSInfo"
"%programfiles%\Windows NT\Accessories"
"%programfiles%\Windows NT\Pinball"
"%commonprogramfiles%\System"
"%windir%\system32\Restore"
"%windir%\system32\srchasst"
"%windir%\system32\usmt"
"%commonprogramfiles%\Microsoft Shared\Speech"
"%programfiles%\NetMeeting"
"%commonprogramfiles%\System\Mapi\1033"
"%commonprogramfiles%\Adobe\Calibration"
"%programfiles%\Symantec\LiveUpdate"
"%programfiles%\WildTangent\Apps\CDA"
"%programfiles%\Stardock\Object Desktop\IconPackager"
) do (
if not exist %fl2% (
if exist "%%~*\%~nx1" (
set "pth=%%~*\"
type nul > %fl2%
)
)
)
if exist %fl2% del %fl2%
)
exit/b0

:brk Exit Replacer ([Purge] [Now])
:: Clean up and exit
if not "%~1"=="Purge" (
if not "%~1"=="Now" (
echo/
echo/Press any key to quit.
pause >nul
)
)
if /i not "%~1"=="Purge" if exist "%scr%" popd
for %%* in (%vbs% %fil% %flg%
%fl2% "%scr%" %del% "%scr%-tmp" %dlp%
) do if exist %%* del/f %%* >nul 2>&1
if /i not "%~1"=="Purge" (
if exist "%dir%" rd "%dir%" 2>nul
endlocal
:: Use a hard exit to prevent other loops from continuing
exit
)
exit/b0

:: List of special files requiring more (or less) steps
:\\Luna
set "fln=luna.mst"
set "atr=wfp"
exit/b0
:\\Shellstyle
if /i not "%pth:Homestead=%"=="%pth%" (
set "fln=home_ss.dll"
)
if /i not "%pth:Metallic=%"=="%pth%" (
set "fln=metal_ss.dll"
)
if /i not "%pth:NormalColor=%"=="%pth%" (
set "fln=blue_ss.dll"
)
if /i not "%pth:\system32\=%"=="%pth%" (
set "fln=class_ss.dll"
)
set "atr=wfp"
exit/b0
:\\Marlett
set "atr=non"
exit/b
:\\Comctl32
if /i not "%pth%"=="%windir%\system32\" (
set "atr=non"
)
exit/b
:\\Commdlg
if /i not "%pth%"=="%windir%\system\" (
set "atr=non"
)
exit/b
:\\Notepad
if /i not "%pth%"=="%windir%\" (
set "atr=non"
)
exit/b
:\\Uxtheme.dll
set "atr=wfp"
:\\Comctl320
set "pth=%windir%\system32\"
exit/b
:\\Comctl321
set "pth=%windir%\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_x-ww_1382d70a\"
exit/b
:\\Comctl322
set "pth=%windir%\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\"
exit/b
:\\Comctl323
set "pth=%windir%\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1331_x-ww_7abf6d02\"
exit/b
:\\Comctl324
set "pth=%windir%\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1515_x-ww_7bb98b8a\"
exit/b
:\\Comctl325
set "pth=%windir%\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\"
exit/b
:\\Commdlg0
set "pth=%windir%\system\"
exit/b
:\\Commdlg1
set "pth=%windir%\system32\"
exit/b
:\\Notepad0
set "pth=%windir%\"
exit/b
:\\Notepad1
set "pth=%windir%\system32\"
exit/b
:\\Shellstyle0
set "pth=%windir%\system32\"
exit/b
:\\Shellstyle1
set "pth=%windir%\Resources\Themes\Luna\Shell\NormalColor\"
exit/b
:\\Shellstyle2
set "pth="%windir%\Resources\Themes\Luna\Shell\Metallic\"
exit/b
:\\Shellstyle3
set "pth=%windir%\Resources\Themes\Luna\Shell\Homestead\"
exit/b

:: List of script line formats
:\RNO
set "mod=Restore"
set "num=%~2"
set "opt=%~3"
exit/b
:\R-O
set "mod=Restore"
set "num="
set "opt=%~2"
exit/b
:\RN-
set "mod=Restore"
set "num=%~2"
set "opt="
exit/b
:\R--
set "mod=Restore"
set "num="
set "opt="
exit/b
:\-N-
set "mod=%sys%"
set "num=%~1"
set "opt="
exit/b
:\-NO
set "mod=%sys%"
set "num=%~1"
set "opt=%~2"
exit/b
:\--O
set "mod=%sys%"
set "num="
set "opt=%~1"
exit/b
:\M--
set "mod=%~1"
set "num="
set "opt="
exit/b
:\MN-
set "mod=%~1"
set "num=%~2"
set "opt="
exit/b
:\M-O
set "mod=%~1"
set "num="
set "opt=%~2"
exit/b
:\MNO
set "mod=%~1"
set "num=%~2"
set "opt=%~3"
exit/b
:\---
set "mod=%sys%"
set "num="
set "opt="
exit/b

:: Clear_WFP_Message.vbs -- clears the WFP message
' Clears WFP message
const win="Windows File Protection"
const wi2="Unable To Locate Component"
set arg=wscript.arguments
if arg.count then
flg=arg.item(0)
else wscript.echo "Bad parameters."
wscript.quit
end if
set w=wscript.createobject("wscript.shell")
set f=wscript.createobject("scripting.filesystemobject")
x=999
while x > 0
if w.appactivate(win) then
w.sendkeys "{ESC}"
w.sendkeys "{TAB}{ENTER}"
end if
if w.appactivate(wi2) then
w.sendkeys "{ESC}{TAB}{ENTER}"
end if
if f.fileexists(flg) then
x=45
f.deletefile(flg)
end if
wscript.sleep 333
x=x-1
wend

想学习去
http://bbs.verybat.org/
全是批处理...

无注释发个自己写来娱乐的东西

@echo off
set miharunum=0
:menu
echo set命令进行字符截取
echo m前第0位 i第17位
echo ↓ ↓
echo 使用命令set test=miharutatebayashi
echo,
set test=miharutatebayashi

echo echo %%test:~0,5%% 效果→→→%test:~0,5%

echo echo %%test:~1,5%% 效果→→→%test:~1,5%

echo echo %%test:~15,5%% 效果→→→%test:~15,5%

echo echo %%test:~0%% 效果→→→%test:~0%

echo echo %%test:~1%% 效果→→→%test:~1%

echo echo %%test:~13%% 效果→→→%test:~13%

echo echo %%test:~0,-1%% 效果→→→%test:~0,-1%

echo echo %%test:~0,-3%% 效果→→→%test:~0,-3%

echo echo %%test:~10,-3%% 效果→→→%test:~10,-3%

set /a miharunum+=1 & echo %miharunum%
pause>nul & cls & goto menu

http://zhidao.baidu.com/question/83468678.html
以上是我自己写的批处理,算是比较长的那种了,220分的题目,能看懂你就算半个高手了~~~~

PS:不是长的批处理就有你学习的用途的,如果长的话但代码类似的,那你学来学去还不都是复习那几点内容。

有不懂的地方可以问下我,但全部注释就免了吧,我很忙没有空给你写啊。


求大家的长批处理
http:\/\/bbs.verybat.org\/ 全是批处理... 无注释发个自己写来娱乐的东西 @echo off set miharunum=0 :menu echo set命令进行字符截取 echo m前第0位 i第17位 echo ↓↓ echo 使用命令set test=miharutatebayashi echo, set test=miharutatebayashi echo echo %%test:~0,5%% 效果→→→%test:~0,5% ec...

有关Excel的批处理工作表的小技巧
1、打开多个工作簿 在“文件”菜单中执行“打开文件”命令,在弹出的对话框中,按住“Shift”键或“Ctrl”键并点击鼠标左键操作,选择彼此相邻或不相邻的多个工作簿,然后按下“确定”按钮,就可以一次打开多个工作簿了。2、不退出Excel而关闭所有...

PS如何批量处理图片大小
1、首先我们打开Photoshop,插入一张照片,之后如图所示,选择“窗口”之后选择“动作”或者直接按ALT + F9 2、接着如图所示点击下面第四个图标“创建新组”按钮,命名为“批量处理”3、接着如图所示点击下面第五个图标“创建新工作”按钮,命名为“缩小图片”,之后点击“记录”我们所做的动作都会记录下...

批处理是什么?能干什么?
其实编写批处理文件并没有什么编程环境的要求,任何一个文本编辑器都可以用来编写批处理文件,像DOS下的Edit、WPS以及DOS自带的Copy命令的扩展copy con命令就可以编写,Windows下的记事本、写字板等。4.批处理文件的工作平台。由于批处理文件其实就是一个命令的集合,所以批处理文件的工作平台是由这些命令...

PS软件中的批处理功能如何使用
1. 首先打开电脑上的PS软件,进入主页面后,按键盘上的CTRL O组合键,选择打开一张图片。2. 接着,按键盘上的ALT F9组合键,调出动作窗口,选择新建一个动作,将重复工作的内容录制成一个动作。3. 然后点击左上方的文件选项,在打开的菜单中,依次点击“自动”---“批处理”选项。4. 在弹出的批...

photoshop批处理教程
1、进入PS CS2,打开其中一张要处理的图片,然后切换到动作面板,点击新建动作按钮,如图:2、输入动作名称并按“记录”按钮开始记录需要批处理的步骤,如图:3、开始进行需要批处理的步骤,例如按Ctrl+U进行饱和度调整,如图:4、进行了需要批处理的步骤后返回到动作面板,点击“停止”记录按钮,如图:5...

如何使用PS软件中的自动批处理功能
具体如下:1. 首先,请大家找到电脑中的“PS”软件,点击进入主界面,然后依次选择其中的“文件”——“自动”——“批处理”按钮。2. 第二步,接下来,我们点击屏幕中已经建立好的动作,比如说“图片大小”这一项。3. 第三步,完成上一步后,请大家点击想要进行处理的图片所在的文件夹。4.第四步...

如何编写批处理文件?
1、首先,在电脑桌面右键单击空白处,在新建一个文本文档。2、然后,在文本文档中输入需要执行查看IP地址的命令。3、接着,按enter回车键,再输入我们需要执行的命令和网关地址。4、之后,输入暂停按钮的命令,再保存该文本文档后,并关闭它。5、点选文本文档,再按键盘上的F2键,再把文本文档命名为**...

photoshop中怎样批处理操作
先做准备工作:把所有待处理的图片放到一个文件夹里,新建一个文件夹用来放置处理过的图片。执行“文件→自动→批处理”打开批处理命令框。接着设置各个参数和选项。1. 在“动作”下拉菜单中选择“我的动作”。2. 在“源”下拉菜单中选择“文件夹”。3. 单击[选取]按钮在弹出的对话框中选择待处理的...

电脑ps软件内怎么使用批处理功能将图片的宽度设置为相同值
当我们在使用电脑的时候,可以下载ps然后来对图片进行一些处理,那么如果想要批量处理图片并将宽度设置为相同的值的话,应如何操作呢?接下来就由小编来告诉大家。具体如下:1. 第一步,打开电脑中的ps软件,然后导入图片,再点击上方的窗口功能选项,最后点击下拉菜单中的动作选项。2. 第二步,点击动作...

伊通满族自治县18628948015: 求一个批处理!悬赏100分! -
苍梧裴百宏: 代码如下:@echo off setlocal ENABLEDELAYEDEXPANSION set /p str=请输入:>nul (echo %str% | find "2") if !errorlevel! equ 0 (goto:a)>nul (echo %str% | find "好") if !errorlevel! equ 0 (goto:b) goto:eof:a echo %str% pause goto:eof:b echo %str% pause goto:eof结果如下:1. 输入:1232. 输入:你好3. 输入:999 直接退出4. 输入:批处理 直接退出-- 有什么不符的,跟我联系.

伊通满族自治县18628948015: 求救批量处理相片的方法 -
苍梧裴百宏: 用自动——批处理命令.分两步.第一步:先录制动作.这个菜单在右方调板上,找一下就找得到了.录制动作就跟录像一样,你只要打开一张照片,然后更改它的分辨率,注意要勾选约束比例项,或者直接修改分辨率值.改好后,另存在一个...

伊通满族自治县18628948015: 求一段文本格式批处理 -
苍梧裴百宏: 假设存储文本的文件是a.txt,然后逗号,空格处换行,去掉重复的词语,结果存储在文件b.txt中 @echo off setlocal enabledelayedexpansion set a=$ echo 请稍等几分钟.....cd .>b.txt for /f "delims=" %%a in (a.txt) do ( for %%B in (%%a) do ( echo ...

伊通满族自治县18628948015: 求一个复制后再执行的批处理
苍梧裴百宏: 批处理是在DOS下执行的,不认长文件名,所以建议用VBS完成比较实用.

伊通满族自治县18628948015: COPY命令隐藏结果输出编写一个比较长的bat批处理的时候,用c
苍梧裴百宏: 我在运行里输入CMD后测试了一下你说的情况 结果是这样的,只要你用copy这个命令, 无论你是否复制成功,都会有提示的. 复制失败也会提示有0个文件被复制的. 也就是说,根本做不到隐藏结果的输出.

伊通满族自治县18628948015: 求一个批处理文件的编写 -
苍梧裴百宏: 我想出来一个:1建立一个批处理 @if not exist ip.txt (echo 没有发现ip.txt.. f "tokens=3,4 delims== " %%i in ('ipconfig ^|findstr /r "本...

伊通满族自治县18628948015: 请大虾大家们帮忙帮忙做个批处理吧情况是酱紫,最近我想做个的批处理
苍梧裴百宏: 这个靠批处理不行 批处理不能输出xls文件 如果输出csv的话貌似可以,但是文件中如果有逗号又不行了 所以要用脚本

伊通满族自治县18628948015: 求几个批处理文件代码1关机<br/2定时关机br/>3运行D
苍梧裴百宏: 1.shutdown -s -t 0 2.at 12:00 shutdown -s -t 0 3.call D:Program Files111.exe 4.del /f D:AAA. txt 5.REN 3333.txt 4444.txt REN 2222.txt 3333.txt REN 4444....

伊通满族自治县18628948015: 编写一个批处理,删除桌面上所有的快捷方式
苍梧裴百宏: 批处理删除桌面快捷方式 时间久了,桌面上就会放置大量各种软件的快捷方式,使得机子运行缓慢,切不雅观,如何快速清除这些快捷方式呢,为此笔者为大家编写了如下的批处理: 将下面内容复制到记事本,然后保存为*.bat(*代表可任意命...

伊通满族自治县18628948015: 求批处理.删除大于100M的文件的问题.
苍梧裴百宏: 根本不需要什么批处理了. 使用WINDOWS自带的搜索功能,搜索*.*,即找到硬盘里的全部文件.然后按照文件大小进行排序,凡是排列在100M以上的文件,全部删除即可. 如果你只想删除某个特定范围内的文件,只需在特定范围内搜索即可.

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网