%22 will be interpreted as a double quote, just like %0d%0a is interpeted as a Carriage return/Line Feed. You would then have to replace (pathnames) with ("%22" & pathnames of it & “%22”)
delete __appendfile
appendfile {concatenation “%0d%0a” of ("%22" & pathname of it & “%22”) of files whose ( now - modification time of it > 1 * minute ) of folder “C:\myfolder”}
copy __appendfile list.txt
dos for /F %i in (list.txt) do del %i
The problem with is is that dos still execute correctly because of the space. You might consider building a batch file on the fly and executing that. This will build a batch file that looks like:
del /F “name of file.txt”
del /F “name of file.doc”
del /F “any other files.file”
The example below worked for files with spaces.
delete __appendfile
appendfile {concatenation “%0d%0a” of (“del /F %22” & pathname of it & “%22”) of files whose ( now - modification time of it > 1 * minute ) of folder “C:\myfolder”}