博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
百度网盘文件自动分类sql 并带有对应标识图标
阅读量:2390 次
发布时间:2019-05-10

本文共 8864 字,大约阅读时间需要 29 分钟。

效果:

文件自动分类sql

update file set type='1' where category='-1'; -- 其它云文件

update file set type='3' where category='1'; -- 视频
update file set type='5'  where type='2'; -- 音频
update file set type='7' where category='3'; -- 图片
update file set type='9' where category='4'; -- 文档
update file set type='11' where category='5'; -- 软件
update file set type='1' where category='6'; -- 云
update file set type='16' where category='7'; -- 种子
update file set type='3' where filename like '%.mp4'; -- 视频
update file set type='3' where filename like '%.avi'; -- 视频
update file set type='3' where filename like '%.rmvb'; -- 视频
update file set type='3' where filename like '%.flv'; -- 视频
update file set type='3' where filename like '%.mkv'; -- 视频
update file set type='3' where filename like '%.flv'; -- 视频
update file set type='5' where filename like '%.mp3'; -- 音频
update file set type='7' where filename like '%.jpg'; -- 图片
update file set type='9' where filename like '%.txt'; -- 文档
update file set type='9' where filename like '%.pdf'; -- 文档
update file set type='9' where filename like '%.mobi'; -- 文档
update file set type='9' where filename like '%.doc'; -- 文档
update file set type='9' where filename like '%.docx'; -- 文档
update file set type='9' where filename like '%.wps'; -- 文档
update file set type='9' where filename like '%.ppt'; -- 文档
update file set type='9' where filename like '%.xls'; -- 文档
update file set type='9' where filename like '%.xlsx'; -- 文档
update file set type='9' where filename like '%.epub'; -- 文档
update file set type='9' where filename like '%.rtf'; -- 文档
update file set type='11' where filename like '%.exe'; -- 软件
update file set type='16' where filename like '%.torrent'; -- 种子
update file set type='13' where filename like '%.dmg'; -- 压缩包
update file set type='13' where filename like '%.GHO'; -- 压缩包
update file set type='13' where filename like '%.iso'; -- 压缩包
update file set type='13' where filename like '%.zip'; -- 压缩包
update file set type='13' where filename like '%.rar'; -- 压缩包
update file set type='13' where filename like '%.7z'; -- 压缩包
update file set type='14' where size='1024'; -- 文件夹
update file set type='0' where size='专辑'; -- 专辑
update file set type='12' where category is null; -- 手动添加的
update file set type='4' where size like '%个'; -- 多个文件
select category,count(*) from file group by category; -- 分类统计
select * from file where category is null limit 1000;
select * from file where type='6' limit 1000;
select type,count(*) from file group by type; -- 分类统计
select * from file where Id>7527035 and type='6' limit 1000;
select type,count(*) from file where Id>7527035 group by type;  -- 分类统计

php自动执行

	
正在整理分类文件'; echo "
".mysql_query("update file set type='1' where category='-1'"); // 其它云文件echo "
".mysql_query("update file set type='3' where category='1'"); // 视频echo "
".mysql_query("update file set type='5' where type='2'"); // 音频echo "
".mysql_query("update file set type='7' where category='3'"); // 图片echo "
".mysql_query("update file set type='9' where category='4'"); // 文档echo "
".mysql_query("update file set type='11' where category='5'"); // 软件echo "
".mysql_query("update file set type='1' where category='6'"); // 云echo "
".mysql_query("update file set type='16' where category='7'"); // 种子echo "
".mysql_query("update file set type='3' where filename like '%.mp4'"); // 视频echo "
".mysql_query("update file set type='3' where filename like '%.avi'"); // 视频echo "
".mysql_query("update file set type='3' where filename like '%.rmvb'"); // 视频echo "
".mysql_query("update file set type='3' where filename like '%.flv'"); // 视频echo "
".mysql_query("update file set type='3' where filename like '%.mkv'"); // 视频echo "
".mysql_query("update file set type='3' where filename like '%.flv'"); // 视频echo "
".mysql_query("update file set type='5' where filename like '%.mp3'"); // 音频echo "
".mysql_query("update file set type='7' where filename like '%.jpg'"); // 图片echo "
".mysql_query("update file set type='9' where filename like '%.txt'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.pdf'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.mobi'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.doc'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.docx'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.wps'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.ppt'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.xls'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.xlsx'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.epub'"); // 文档echo "
".mysql_query("update file set type='9' where filename like '%.rtf'"); // 文档echo "
".mysql_query("update file set type='11' where filename like '%.exe'"); // 软件echo "
".mysql_query("update file set type='16' where filename like '%.torrent'"); // 种子echo "
".mysql_query("update file set type='13' where filename like '%.dmg'"); // 压缩包echo "
".mysql_query("update file set type='13' where filename like '%.GHO'"); // 压缩包echo "
".mysql_query("update file set type='13' where filename like '%.iso'"); // 压缩包echo "
".mysql_query("update file set type='13' where filename like '%.zip'"); // 压缩包echo "
".mysql_query("update file set type='13' where filename like '%.rar'"); // 压缩包echo "
".mysql_query("update file set type='13' where filename like '%.7z'"); // 压缩包echo "
".mysql_query("update file set type='14' where size='1024'"); // 文件夹echo "
".mysql_query("update file set type='0' where size='专辑'"); // 专辑echo "
".mysql_query("update file set type='12' where category is null"); // 手动添加的echo "
".mysql_query("update file set type='4' where size like '%个'"); // 多个文件echo '
整理完成。当前时间:'.date('Y-m-d H:i:s');/* 注释内容0 .x6 专辑1 .icon 云2 .icon01 Excel3 .icon10 视频4 .icon12 多个文件5 .icon20 音频6 .icon22 x7 .icon30 图片8 .icon32 x9 .icon40 文档10.icon42 x11.icon50 软件12.icon52 其它13.icon60 压缩包14.icon61 文件夹15.icon62 x16.icon70 种子17.icon72 x$typeArray=array("x6","icon","icon01","icon10","icon12","icon20","icon22","icon30","icon32","icon40","icon42","icon50","icon52","icon60","icon61","icon62","icon70","icon72"); //-1 全部 1视频 2音乐 3图片 4程序 5其它 6种子update file set type='1' where category='-1'; -- 其它云文件update file set type='3' where category='1'; -- 视频update file set type='5' where type='2'; -- 音频update file set type='7' where category='3'; -- 图片update file set type='9' where category='4'; -- 文档update file set type='11' where category='5'; -- 软件update file set type='1' where category='6'; -- 云update file set type='16' where category='7'; -- 种子update file set type='3' where filename like '%.mp4'; -- 视频update file set type='3' where filename like '%.avi'; -- 视频update file set type='3' where filename like '%.rmvb'; -- 视频update file set type='3' where filename like '%.flv'; -- 视频update file set type='3' where filename like '%.mkv'; -- 视频update file set type='3' where filename like '%.flv'; -- 视频update file set type='5' where filename like '%.mp3'; -- 音频update file set type='7' where filename like '%.jpg'; -- 图片update file set type='9' where filename like '%.txt'; -- 文档update file set type='9' where filename like '%.pdf'; -- 文档update file set type='9' where filename like '%.mobi'; -- 文档update file set type='9' where filename like '%.doc'; -- 文档update file set type='9' where filename like '%.docx'; -- 文档update file set type='9' where filename like '%.wps'; -- 文档update file set type='9' where filename like '%.ppt'; -- 文档update file set type='9' where filename like '%.xls'; -- 文档update file set type='9' where filename like '%.xlsx'; -- 文档update file set type='9' where filename like '%.epub'; -- 文档update file set type='9' where filename like '%.rtf'; -- 文档update file set type='11' where filename like '%.exe'; -- 软件update file set type='16' where filename like '%.torrent'; -- 种子update file set type='13' where filename like '%.dmg'; -- 压缩包update file set type='13' where filename like '%.GHO'; -- 压缩包update file set type='13' where filename like '%.iso'; -- 压缩包update file set type='13' where filename like '%.zip'; -- 压缩包update file set type='13' where filename like '%.rar'; -- 压缩包update file set type='13' where filename like '%.7z'; -- 压缩包update file set type='14' where size='1024'; -- 文件夹update file set type='0' where size='专辑'; -- 专辑update file set type='12' where category is null; -- 手动添加的update file set type='4' where size like '%个'; -- 多个文件select category,count(*) from file group by category; -- 分类统计select * from file where category is null limit 1000;select * from file where type='6' limit 1000;select type,count(*) from file group by type; -- 分类统计select * from file where Id>7527035 and type='6' limit 1000;select type,count(*) from file where Id>7527035 group by type; -- 分类统计*/?>

转载地址:http://myaab.baihongyu.com/

你可能感兴趣的文章
New Tool: The PenTesters Framework (PTF) Released
查看>>
Detecting and Defending against PowerShell Shells
查看>>
NagVis实物监控工具
查看>>
nginx - low risk webdav destination bug
查看>>
Lessons Learned from Building and Running MHN, the World's Largest Crowdsourced Honeynet
查看>>
Logwatch Linux/Unix系统日志检测软件
查看>>
减少Linux下Squid服务器的TIME_WAIT套接字数量
查看>>
/etc/sudoers中的含义
查看>>
Five must-know open source SDN controllers
查看>>
Finding Bad Guys with 35 million Flows, 2 Analysts, 5 Minutes and 0 Dollars
查看>>
SANS FOR572 Logstash
查看>>
apt成熟度模型
查看>>
Digital Forensics Framework v0.4.3 available
查看>>
linux设置bond网卡绑定
查看>>
Is your .svn showing (like 3300 other sites)?
查看>>
PCI DSS Update Could Include Virtualization Security(转载自baoz)
查看>>
List of Windows Auto Start Locations
查看>>
OSSIM 2.1 - Multiple security vulnerabilities
查看>>
PHP文件上传源码分析(RFC1867)
查看>>
关于php5.*后的时区问题 date_default_timezone_set ();
查看>>