项目停了,,这个也没用了,,发出来留个记念!!
===========================游戏地址增加,自动入库,想了N天,精华呀==================
@echo off
title download_url地址全自动增加工具 by akin520
echo 请将数据的download_url导入,命名为1.txt,确认好后,请按回车!
pause >nul
echo 分出游戏单地址! 请按回车!
pause >nul
for /f "tokens=1* delims=<" %%a in (1.txt) do @echo %%a>>2.txt
echo 分出游戏名!请按回车!
pause >nul
for /f "tokens=7* delims=:/." %%a in (2.txt) do @echo %%a>>3.txt
echo 增加新的游戏地址!请按回车!
pause >nul
for /f "tokens=7* delims=:/." %%a in (2.txt) do @echo
for /f "tokens=7* delims=:/." %%a in (2.txt) do @echo
echo 合并新地址!请按回车!
pause >nul
for /f "tokens=1* delims=:" %%i in ('findstr /n .* 4.txt') do (
for /f "tokens=1* delims=:" %%a in ('findstr /n .* 5.txt') do (
if %%i==%%a echo %%j^<^<%%b>>6.txt
)
)
echo 合成全新地址!请按回车!
pause >nul
for /f "tokens=1* delims=:" %%i in ('findstr /n .* 1.txt') do (
for /f "tokens=1* delims=:" %%a in ('findstr /n .* 6.txt') do (
if %%i==%%a echo %%j^<^<%%b>>7.txt
)
)
echo 生成.sql文件!请按回车!
pause >nul
@echo off
for /f "tokens=1* delims=:" %%i in ('findstr /n .* 7.txt') do (
for /f "tokens=1* delims=:" %%a in ('findstr /n .* 3.txt') do (
if %%i==%%a echo update games set download_url='%%j' where game_name='%%b';>>sql.sql
)
)
echo 完成,请按回车!
pause >nul
echo 导入mysql数据库,请按回车!
pause >nul
mysql -u link -pakinkilo game_db < c:\sql.sql
echo 删除LJ!请按回车!
del 2.txt
del 3.txt
del 4.txt
del 5.txt
del 6.txt
del 7.txt
==================自动分目录rlm-rmm.bat========================
del 1.txt
del b.txt
del bb.txt
tree /f e:\temp-download >1.txt
findstr /c:"rmvb" 1.txt >b.txt
for /f "tokens=1* delims=_. " %%a in (b.txt) do echo %%a >>bb.txt
for /f "tokens=1* delims=_. " %%a in (b.txt) do md %%a
for /f "tokens=1* delims=_. " %%a in (b.txt) do move /y %%a*.rmvb %%a
del 1.txt
del b.txt
del bb.txt
del fml-rmm.bat
========================分游戏========================
del 2.txt
tree /f game >a.txt
findstr /c:"exe" a.txt >b.txt
for /f "tokens=1* delims=. " %%a in (b.txt) do @echo >> 2.txt
del a.txt
del b.txt
=============================自动压缩文件=======================
for /f %%a in ('dir /b /ad') do cd "%%a" &&start /w winrar a -r ..\"%%a".rar&&start /w winrar s ..\"%%a".rar&&del ..\"%%a".rar&&cd ..&&rmdir "%%a" /s /q
del %0
阅读(2193) | 评论(0) | 转发(0) |