anchor.diff:    del !file.%%N!
     taskkill /PID !pid! /F 2>nul
   )
  +
  +:: Delete temporary folder
  +RD /S /Q %TMP_FILE_DIRECTORY%
positive.code:   set ADDRESS_WIDTH=32
  )
  
  rem The HEAP_SIZE variable defines the Java heap size in MB.
  rem That is the total amount of memory available to MZmine 2.
  rem By default we set this to 1024 MB on 32-bit systems. On 
  rem 64-bit systems we either set it to half of the total
  rem memory or 2048 MB less than the total memory.
  rem Feel free to adjust the HEAP_SIZE according to your needs.
  if %ADDRESS_WIDTH%==32 (
    set HEAP_SIZE=1024
  ) else (
    if %TOTAL_MEMORY% gtr 4096 (
  	set /a HEAP_SIZE=%TOTAL_MEMORY%-2048
    ) else (
  	set /a HEAP_SIZE=%TOTAL_MEMORY% / 2
    )
  )
  echo Java heap size set to %HEAP_SIZE% MB
  
  rem If you do not want MZmine to sends anonymous statistics of the module
  rem usage in the software then please set the MZ_STATISTICS parameter to 0.
  rem 1 = activated, 0 = deactivated.
  set MZMINE_STATISTICS=1
  
  rem The TMP_FILE_DIRECTORY parameter defines the location where temporary 
  rem files (parsed raw data) will be placed. Default is %TEMP%, which 
  rem represents the system temporary directory.
  set TMP_FILE_DIRECTORY=%TEMP%
  rem Do not modify:
  rem DOS make sure to use 'short name' representation for temp directory
  for %%f in ("%TMP_FILE_DIRECTORY%") do (set TMP_FILE_DIRECTORY=%%~sf)
  rem rem and forward slashed (required by features not supporting spaces or '\').
  rem set TMP_FILE_DIRECTORY=%TMP_FILE_DIRECTORY:\=/%
  rem Make the temp working dir unique per MZmine instance.
  rem for /f "skip=1" %%x in ('wmic os get localdatetime') do (set MZMINE_UNID="MZmine"%%x)
  for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
  set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%_%ldt:~8,2%-%ldt:~10,2%-%ldt:~12,6%
  set MZMINE_UNID=MZmine%ldt%
  
negative.code: set TMP_FILE_DIRECTORY=%TMP_FILE_DIRECTORY%\\%MZMINE_UNID%
  mkdir %TMP_FILE_DIRECTORY%
  
  
  
  :: **********************
  :: Java specific commands
  :: **********************
  
  set JAVA_PARAMETERS=-showversion -classpath lib\* -Djava.ext.dirs= -XX:+UseParallelGC -Djava.io.tmpdir=%TMP_FILE_DIRECTORY% -Xms%HEAP_SIZE%m -Xmx%HEAP_SIZE%m
  set MAIN_CLASS=net.sf.mzmine.main.MZmineCore
  
  :: Starts the Java Virtual Machine
  %JAVA_COMMAND% %JAVA_PARAMETERS% %MAIN_CLASS% %*
  
  :: If there was an error, give the user a chance to see it
  IF ERRORLEVEL 1 pause
  
  
  
  :: *****************
  :: Clean-up commands
  :: *****************
  
  setlocal disableDelayedExpansion
  
  :: Kill/clean-up remaining Rserve instances
  :: Load the file path "array"
  for /f "tokens=1* delims=:" %%A in ('dir /b %TMP_FILE_DIRECTORY%\rs_pid_*.pid^|findstr /n "^"') do (
    set "file.%%A=%TMP_FILE_DIRECTORY%\%%B"
  