2013koko 当前离线
列兵
xp3000 当前离线
少尉
TOP
cutebe 当前离线
上尉
dir/a-d/b/og "%~1">"%~dp0outfile.txt"复制代码
@echo off if "%~1"=="" echo,请拖入文件夹到本文件上&pause&exit /b for %%i in (%*) do ( for /f "delims=" %%j in ('"dir /a/s/b/on %%i"') do ( echo %%~nxj ))>>名称.txt pause复制代码
newswan 当前离线
@echo off setlocal enableDelayedExpansion if "%~1"=="" echo,请拖入文件夹到本文件上&pause&exit /b for /f "usebackq" %%a in (`Powershell -c "'%1'.Length"`) do ( set /a n=%%a+1 ) for /f "delims=" %%j in ('"dir /a/s/b/on %1"') do ( set str=%%~j set str=!str:~%n%! echo !str! ) pause 得到全路径,截取复制代码
(for /f "delims=" %%a in ('dir/a-d/b/s/og "%~1"')do @echo %%~nxa)>"%~dp0outfile.txt"复制代码
@echo off setlocal enableDelayedExpansion for /f "usebackq" %%a in (`Powershell -c "'%1'.Length"`) do ( set /a n=%%a+1 ) for /f "usebackq delims=" %%a in (` dir /a/s/b/on %1 ^| findstr /v "EBWebView" `) do ( set str=%%~a set str=!str:~%n%! echo !str! ) > list.txt复制代码
dir/a-d/b/s/og "%~1">"%~dp0%~n1_filelist.txt" set "dirstr=%~1\" sed -i "s/^%dirstr:\=\\%//" "%~dp0%~n1_filelist.txt"复制代码