title: GIMP on Windows - executing a python-fu script from the command line
body: <p>In a Windows environment, I would like to make a call to GIMP for executing a python-fu script (through a BAT file) but the command line call I am using does not produce the expected results.</p>
  
  <p>For example, consider the following python-fu script named <code>makeafile_and_quit.py</code>, which rerside in my GIMP's <code>plug-ins</code> folder.  Its purpose is to load an existing image and save under a different name:</p>
  
  <pre><code>#!/usr/bin/env python
  
  # Sample call from GIMP's python-fu console:
  # pdb.python_fu_makeafile_and_quit_script()
  
  from gimpfu import *
  
  def makeafile_and_quit( ) :
  
      FILEPATH   = 'C:\\path\\to\\file.JPG'
      IMAGE      = pdb.gimp_file_load( FILEPATH,  FILEPATH )
  
      pdb.gimp_file_save( IMAGE, pdb.gimp_image_get_active_drawable( IMAGE ), FILEPATH + '_2.jpg',  FILEPATH + '_2.jpg' )
  
      pdb.gimp_quit(0)
  
      return
  
  
  # PLUGIN REGISTRATION
  # This is the plugin registration function
  register(
      'makeafile_and_quit_script',
      'v0.0',
      'A new concept',
      'Author',
      'Author',
      'Just now',
      '&lt;Toolbox&gt;/MyScripts/This will make a file and _QUIT',
      '',
      [],
      [],
      makeafile_and_quit
      )
  
  main()
  </code></pre>
  
  <p>The script executes flawlessly if called from a 'GUI instance' of GIMP, calling the script through the menus.  It produces a new file ending with '_2.jpg' in the same folder as the source file.</p>
  
  <p>The behaviour is different when called from the command prompt using the following:</p>
  
  <pre><code>"C:\Program Files\GIMP 2\bin\gimp-2.8.exe" --batch '("makeafile_and_quit.py")' -b "(gimp-quit 0)"
  </code></pre>
  
  <p>An instance of GIMP is created, then, closes but no file is created even though the message <code>batch command executed successfully</code> is seen.</p>
  
  <p>How can I repeat exactly the same behaviour as a 'GUI instance', from the command line?</p>