Forum How do I...?

Ignore "error: could not load input file" in cli

doritonni
Hello!

I want to merge all my .svg files from many books using the command line interface. For this, I use the .batch script. So, I have a question:
When I use the loop in my script, I want to specify the number of pages 999 (just in case). Unfortunately, when a script hits a non-existent page, an error occurs:

prince: G:/book1/svg/page377.svg: error: can't open input file: No such file or directory
prince: warning: failed to load external entity "G:/book1/svg/page377.svg"
prince: G:\book1\svg\page377.svg: error: could not load input file
prince: error: failed to load all input documents


How can I ignore this error?
mikeday
The best solution would be to write the script in a way that only checks the files that actually exist, eg. *.svg or page*.svg