『楼 主』:
%userprofile%下个人用的小工具
我把那些批处理打包了,传在网盘上,换一台机子的时候
就开始 -- 运行 cmd ->explorer %cd% 打开默认cmd所在路径。
粘贴这个包裹并执行。
因为我所接触的大部分机子默认的运行cmd后路径都是%userprofile%
(在我这里是C:\Documents and Settings\amateur )
所以,习惯在这个文件夹下面放这些小工具,方便运行直接调用。
我把一些经常打开的网站的中间的域名写了打开对应网站的批处理
当我调用这个名字的时候,就可以打开了
比如默认cmd路径下输入mail 是打开邮箱。
me 是打开我的网志。
dos 是打开cn-dos论坛~ 等等
另一些是cmd下进入某个目录的,因为桌面是经常做临时操作的地方,
所以还有一个desk.bat 当输入desk的时候,进入桌面,方便鼠标和
命令行交互操作。
myfolder.bat 打开我常打开的个人文件夹。
closer 里面就是shutdown
restart 里面还是shutdown
express 是快递查询~
rtime 查看上机时间。
@set file="ys2.bat" "ys168.bat" "soft.bat" "rtime.bat" "restart.bat" "renx.bat" "qupan.bat" "paktc.bat" "myway.bat" "me.bat" "mail.bat" "gzuc.bat" "express.bat" "dos.bat" "desk.bat" "close.bat" "bathome.bat"
@echo off
for %%a in (%file%) do (call :setup %%~a)
exit
:setup
set "act="
for /f "delims= eol=" %%a in (%~nx0) do (
if "%%a"=="::%* end" (goto :eof)
if defined act echo,%%a>>"%*"
if "%%a"=="::%*" errcommand>"%*" 2>nul&set act=act
)
::bathome.bat
start http://bbs.bathome.cn
::bathome.bat end
::close.bat
shutdown -s -f -t 00
exit
::close.bat end
::desk.bat
cd /d "桌面\"
exit /b
::desk.bat end
::dos.bat
start http://www.cn-dos.net/forum
::dos.bat end
::express.bat
@echo off
echo,
echo, deppon - 德邦
echo, lbex - 龙邦
echo, sf - 顺风
echo, yunda - 韵达
echo, fengda - 丰达
echo, lts - 联昊通
echo,
echo,退出 exit
echo,
set deppon="http://www.deppon.com/"
set lbex="http://www.lbex.com.cn/"
set sf="http://www.sf-express.com/"
set yunda="http://www.yundaex.com/"
set fengda="http://www.fd168.com.cn/"
set lts="http://lts.com.cn/web/index.asp"
:input
set /p inp="Input:"
if "%inp%"=="exit" (exit)
if not defined %inp% (echo,请输入一个已有的选项,谢谢。&goto :input)
call :next %%%inp%%%
exit /b
:next
start %~1
goto :eof
::express.bat end
::gzuc.bat
start http://bbs.gzuc.net/
::gzuc.bat end
::mail.bat
start http://mail.163.com
::mail.bat end
::me.bat
start http://hi.baidu.com/523066680
::me.bat end
::myway.bat
explorer e:\existspace\
::myway.bat end
::paktc.bat
start http://hi.baidu.com/paktc
::paktc.bat end
::qupan.bat
start http://523066680.qupan.com
::qupan.bat end
::renx.bat
@echo off &setlocal enabledelayedexpansion
title made by http://hi.baidu.com/523066680
cd /d "%1"
echo,当前处于 %cd%
:write-geshi
set /p geshi="请输入将被重命名的文件格式,如jpg:"
if not exist *.%geshi% echo.当前不存在该格式文件 &goto write-geshi
if "%geshi%"=="" echo.当前不存在该格式文件 &goto write-geshi
cls
:write-left
echo.给文件名输入特征部分,输入a-则命名为a-001,a-002……
echo.直接enter则名字直接为序号
echo.不要输入特殊字符
set /p tezheng=":"
:write-lei
set /p lei="选择类型,输入 001 或1 :"
if "%lei%"=="001" (call :001 &goto :over)
if "%lei%"=="1" (call :1) else (echo.输入错误 &goto :write-lei)
:over
echo over! 按任何键继续 &pause>nul &exit
:001
set /a i=0,j=0,k=0
ren *.%geshi% *.%geshi%#
for /f "tokens=*" %%a in ('dir *.%geshi%# /b') do (
set /a k+=1
if !k! equ 10 (set j=)
if !k! equ 100 (set i=)
ren "%%a" "%tezheng%!i!!j!!k!.%geshi%" >nul 2>nul
echo !i!!j!!k!
)
goto :eof
:1
set /a k=0
ren *.%geshi% *.%geshi%#
for /f "tokens=*" %%a in ('dir *.%geshi%# /b') do (
set /a k+=1
ren "%%a" "%tezheng%!k!.%geshi%"
echo !k!
)
goto:eof
::renx.bat end
::restart.bat
shutdown -r -f -t 00
::restart.bat end
::rtime.bat
systeminfo |find "系统启动时间:"
::rtime.bat end
::soft.bat
@echo off
:select
if "%1"=="" (goto :next)
if "%1"=="aviedit" start "" "C:\Program Files\Avidemux 2.5\avidemux2_qt4.exe"
if "%1"=="convert" start "" "C:\Program Files\FormatFactory\FormatFactory.exe"
if "%1"=="mplayer" start "" "C:\Program Files\Ringz Studio\Storm Codec\mplayerc.exe"
if "%1"=="alitalk" start "" "C:\Program Files\AliWangWang\alitalk.exe"
if "%1"=="qq" start "" "d:\program files\tencent\qq\qq.exe"
goto :eof
:next
echo,Arguments:
echo, aviedit
echo, convert
echo, mplayer
echo, alitalk
pause &exit /b
::soft.bat end
::ys168.bat
start http://523066680.ys168.com
exit /b
::ys168.bat end
::ys2.bat
start http://paktc.ys168.com
::ys2.bat end [ Last edited by 523066680 on 2009-10-25 at 22:34 ]
|