script fu script processing

I am working on developing a scripting capability generated by GIMP choices. Right now, I have made progress, but not in a native GIMP dialect. For this, I wish to use script-fu.

I have set up a VERY simple script-fu script. It simply copies a file from one filename to another. If I invoke this from the console from inside GIMP (Filters-Script-fu->Console), the script runs fine. It copies the file. If I attempt to run the script from a Windows console window, the script executes, but does not complete. I run the script as:
gimp-2.8 -i --verbose -b ‘(PAT-simple-copy “namein” “nameout”)’ -b ‘(gimp-quit 0)’
The script runs along. The GIMP output window opens, I get a number of messages, and at the end I get 2 lines:

batch command executed successfully

But the final file does not appear.

Here is the script:

(define (PAT-simple-copy fnmi fnmo)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE fnmi fnmi)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-file-save RUN-NONINTERACTIVE image drawable fnmo fnmo)
(gimp-image-delete image)
))

You cannot use single-quotes on a Windows command-line.

You could try
gimp-2.8 -i --verbose -b “(PAT-simple-copy \“namein\” \“nameout\”)” -b “(gimp-quit 0)”

Wow. If that is true, it’s truly annoying. Where is this documented?

This is part of the difficulty of open-source stuff. There’s all kinds of information out there, but it’s all hidden, and not documented clearly.

Here’s another one: When running gimp on the command line, there is a -batch-interpreter= option. What are the choices for this? I cannot find them anywhere.

I just tried that. Yup. Worked with double quotes. Wow, as I said, this is so annoying. Where is this documented?

The double vs single quote is not gimp, nor would it be documented in gimp. It is a windows command line limitation. It’d be documented somewhere in the command.exe help, I suppose.

@paulalan Welcome to the forum! You might want to check out: Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com.