O script bat funcionará com até 15 arquivos, devido à limitação do cmd.exe:
@echo off
setlocal
:getfile
shift
if "%~1"=="" goto end
echo %1
goto getfile
:end
pause
Script Autohotkey que ultrapassa a limitação:
; The script displays the file paths. File paths that were
; dropped onto the Text control. AHK Text control. AHK Text control
; that is part of this AHK script.
; The script bypasses the ~2048 cmd.exe input parameters character limitation.
; See here for more info:
; http://support.microsoft.com/kb/830473
; http://www.tek-tips.com/viewthread.cfm?qid=1666374
;
Gui, Add, Text, vText1 h80, Drag files here
Gui, Show
return
GuiDropFiles:
MsgBox, % "A_GuiControl=" A_GuiControl "'n" ; on what AHK control were files dropped
. "A_EventInfo=" A_EventInfo "'n" ; number of files
. "A_GuiEvent =" A_GuiEvent ; all filenames, divided by 'n
ExitApp
return