使用PHP来写批处理脚本 -- 多文件重命名处理

    xiaoxiao2022-06-30  55

    rename-somefile.php 这里仅仅为一个小例子,使用PHP写批处理脚本,可以说是简单又实用啊,这里我写的一些例子,会陆续添加:

    <?php $files = scandir("e:/小说") ; //此函数在PHP5中才存在 $files_count = count($files) ; print "\n" . $files_count ; for($i=2;$i<$files_count;$i++) //去掉 . 和 .. //print "\n" . $files[$i] ; rename("e:/小说/". $files[$i],"e:/小说/". "$i.txt"); ?>

     

    转载请注明原文地址: https://ju.6miu.com/read-1125694.html

    最新回复(0)