照片文件太多,能帮忙做个DOS的批处理文件,自动新建文件夹按日期分类照片!
1个回答
2011-05-31
展开全部
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir /b *.jpg') do (
set d=%%~ti
set d=!d:-=!
set d=!d:~0,-5!
echo,!d! %%i>>tt.txt
)
ping -n 3 127.0>nul 2>nul
for /f %%j in (tt.txt) do md %%j>nul 2>nul
for /f "tokens=1,*" %%k in (tt.txt) do move "%%l" .\%%k\"%%l"
echo y|del tt.txt>nul 2>nul
for /f "delims=" %%i in ('dir /b *.jpg') do (
set d=%%~ti
set d=!d:-=!
set d=!d:~0,-5!
echo,!d! %%i>>tt.txt
)
ping -n 3 127.0>nul 2>nul
for /f %%j in (tt.txt) do md %%j>nul 2>nul
for /f "tokens=1,*" %%k in (tt.txt) do move "%%l" .\%%k\"%%l"
echo y|del tt.txt>nul 2>nul
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询