anchor.diff:  SET completeErrFile=%tempDir%\completeErr.txt
   
   :: Create the AWS S3 multipart upload (can't pass null string to --metadata argument)
  -SET partsdir=%partsdir:"=%
   ECHO.
   ECHO Completing the multipart upload to %key% in bucket %bucket%...
  -aws s3api complete-multipart-upload --bucket %bucket% --key %key% --profile %profile% --multipart-upload file://"%ETAGS_JSON%" --upload-id %uploadID%> "%RESPONSE_FILE%" 2> "%completeErrFile%"
  +aws s3api complete-multipart-upload ^
  +    --bucket %bucket% ^
  +    --key %key% ^
  +    --profile %profile% ^
  +    --multipart-upload file://"%ETAGS_JSON%" --upload-id %uploadID% > "%RESPONSE_FILE%" 2> "%completeErrFile%"      &:: File redirection must occur on same line as last option
   
   :: Rethrow any error messages from the AWS API
   FOR /F %%i IN ("%completeErrFile%") DO SET size=%%~zi
  
positive.code: 
  SETLOCAL EnableDelayedExpansion
  
  :: Make sure the provided path exists
  IF NOT EXIST %partsdir% (
      ECHO Error: Could not find the path "%partsdir%" >> "%ERROR_FILE%"
      EXIT /B 1
  )
  
negative.code:     ECHO                     Like with other AWS commands, you can also set the 
      ECHO                     AWS_DEFAULT_PROFILE environment variable beforehand.  Any actual
      ECHO                     value passed to --profile overrides this environment variable.
      ECHO    -o, --options    Options to pass to the create-multipart-upload AWS CLI command.
      ECHO                     Do not pass any options that are specific to upload-part or
      ECHO                     complete-multipart-upload (e.g., --upload-id or --content-length^)
      ECHO                     as they will cause "Unknown option" errors.  Also, make sure 
      ECHO                     that all options are enclosed in double quotes, e.g.:
      ECHO                     `--options "--metadata key=value --storage-class STANDARD_IA"`.
      ECHO                     Obviously, the following options have explicit arguments, so you
      ECHO                     should not pass them here:
      ECHO                        --bucket
      ECHO                        --key
      ECHO                        --profile
      ECHO.
      ECHO    Options can also be specified with a '/' character.  E.g., '/H' to show help.
  )
  