CMD Batch-File Template For Systematically Arrange-Handling Of An Infinite-Amount Of Arguments – Helping To Identifying Types Of Arguments, Including Normalising Partial Or Relative Paths To Fully Qualified Ones

@echo off

::                              input argument "as is" (without any modifications other than stripping-away wrapping: " or ' characters).
set INPUT=%~1
::                              tries to get a DOS-like path (may still be relative). On somehing that does not look like a path it will fallback to empty string.
set INPUT83=%~s1
::                              normalise a possibly relative-path to a fully-qualified short-path.
for /f %%a in ("%INPUT83%")do (set "INPUT83=%%~fsa"  )

:LOOP_START
::                               has argument ?
if ["%INPUT%"]==[""]   ( goto NO_ARG                   )
if ["%INPUT83%"]==[""] ( goto NOT_LOOK_LIKE_FILEFOLDER )
if not exist %INPUT83% ( goto NOT_FILEFOLDER           )

echo INFO:  Argument Exist On The File-System.
if exist %INPUT83%\NUL ( goto ARG_FOLDER               )
goto ARG_FILE

:NO_ARG
  echo INFO:  Argument-List Is Empty.
  goto LOOP_END;

:NOT_LOOK_LIKE_FILEFOLDER
  echo INFO:  Argument Is A Phrase That Does Not Looks Like A Path.
  goto LOOP_NEXT;
::                      you can replace 'goto LOOP_NEXT;' with 'goto ....(something that handles this case)...' and from that "method" (when it's done..) you call for 'goto LOOP_NEXT'

:NOT_FILEFOLDER
  echo INFO:  Argument Looks Like A Path Or A Filename, But It Does Not Exist On The File-System.
  goto LOOP_NEXT;
::                      you can replace 'goto LOOP_NEXT;' with 'goto ....(something that handles this case)...' and from that "method" (when it's done..) you call for 'goto LOOP_NEXT'

:ARG_FOLDER
  echo INFO:  Argument Is A Folder On The File-System.
  goto LOOP_NEXT;
::                      you can replace 'goto LOOP_NEXT;' with 'goto ....(something that handles this case)...' and from that "method" (when it's done..) you call for 'goto LOOP_NEXT'

:ARG_FILE
  echo INFO:  Argument Is A File On The File-System.
  goto LOOP_NEXT;
::                      you can replace 'goto LOOP_NEXT;' with 'goto ....(something that handles this case)...' and from that "method" (when it's done..) you call for 'goto LOOP_NEXT'

::--------------------------------------------------------------------------

:LOOP_NEXT
  shift
  goto LOOP_START

:LOOP_END