@echo off REM Excel用ファイル情報をコピー REM 2_copy_file_info_for_Excel.bat REM shell:sendto に配置 setlocal enabledelayedexpansion set FOLDER=NO set temp_file=%TEMP%\####all_file_name_copy_temp####.txt if exist %temp_file% ( del %temp_file% ) echo パス ファイル名 サイズ 更新日時> %temp_file% if exist "%~1\" if "%~2"=="" set FOLDER=YES if %FOLDER%==NO GOTO FILES SHIFT for /r "%~0" %%i in (*) do ( echo %%~dpi %%~nxi %%~zi %%~ti>> %temp_file% ) GOTO FINAL :FILES :LOOP SHIFT if "%~0"=="" GOTO FINAL set dp=%~dp0 set nx=%~nx0 set zz=%~z0 set tt=%~t0 set attr=%~a0 if "%attr:~0,1%"=="d" ( echo !dp! !nx! !tt!>>%temp_file% ) else ( echo !dp! !nx! !zz! !tt!>>%temp_file% ) GOTO LOOP :FINAL clip < %temp_file% del %temp_file%