在android设备中要创建多个或者多级文件夹时,手动去创建费时费力(有点傻),一个bat文件就能很好的实现这个功能. 1.首先创建同级多个文件夹且在该文件夹下生成一个文件 @echo off echo please wait the devices to connect ..... adb wait-for-device echo device connected set /p i=Please input the number of folder you need: :start set /
echo off ::指定起始文件夹 :: 指定文件夹 set DIR = abc :: d:/abc 改脚本放在d: set DIR="%cd%" echo DIR=%DIR% set /a n=0 setlocal enabledelayedexpansion for %%f in (*.txt) do ( echo %%f echo !n! move %%f filted set /a n+=1 echo ) pause .............................
文件夹中含有子文件夹,修改子文件夹中的图像存储格式,把png图像改为jpg图像,python代码如下: import os import cv2 filePath = 'C:\\Users\\admin\\Desktop\\img' for dirpath, dirnames, filenames in os.walk(filePath): path = [os.path.join(dirpath, names) for names in filenames] for str in path: