I use the following batch file to delete files with full path. The first line of the output file is an error message "The filename, directory name, or volume label syntax is incorrect." All files in C:\DELETE-ALL-FULLPATH.txt are deleted except the first one. I wonder why the first line causes the problem.
@REM This script deletes files which include full path.
@if exist C:\DELETE-all-fullpath-output.txt DEL /Q c:\DELETE-all-fullpath-output.txt
@for /f "tokens=* eol=@ delims=" %%A in ( C:\DELETE-ALL-FULLPATH.txt) do (
@DEL /Q /A "%%A"
) >> C:\DELETE-all-fullpath-output.txt 2>&1
CD /D C:\
These are the first two lines of C:\DELETE-ALL-FULLPATH.txt. All lines have the same format except the numbers are different. All the listed files are deleted except the first one.
c:\Users\administrator\documents\IMG_20190229_134600.jpg
c:\Users\administrator\documents\IMG_20191229_134202.jpg
......