AnsweredAssumed Answered

.bat file to run FMS backup then move clones created during backup only executes first line

Question asked by AdamSnyder_1 on Jun 28, 2018
Latest reply on Jun 29, 2018 by user19752

I am trying to automate streamline our deployment process via batch file scripts on our server.


I have already had great success with dynamically creating a batch file to automate deployment using FMDataMigration command line tool, but the process still requires us to manually run a backup then move the selected clones to a folder before running the tool.


I want to automate the backup and moving of files to eliminate the human error in the process, but when I run the following batch script, it just says “Schedule 'Daily_QA_Backup' will run now.” Then closes the cmd terminal.  The rest of the commands don’t execute.  I followed the same syntax as my other batch file which does work, so I’m not sure what is going on.  I’m a Mac guy, and pretty new to windows batch files.


This batch script only runs first line...

cmd.exe /c fmsadmin RUN SCHEDULE 7
CD Backups\


This batch script runs all lines...

cmd.exe /c fmsadmin CLOSE
cmd.exe /c C:\Users\_fmproserviceacct\Desktop\fm_data_migration_17.0.1.143_x64\FMDataMigration.exe -src_path "P:\Backups\Daily_Production_Backup_2018-06-20_0943\Databases\ASSET_REV_DUL.fmp12" -clone_path "P:\QA_Release\20180625\ASSET_REV_DUL Clone.fmp12" -target_path "L:\Databases\ASSET_REV_DUL Migrated.fmp12" -src_account "acctName" -src_pwd "password" -clone_account "acctName" -clone_pwd "password"
Move "L:\Databases\ASSET_REV_DUL.fmp12" "C:\Users\_fmproserviceacct\Desktop\archive\20180625"
Move "L:\Databases\ASSET_REV_DUL Migrated.fmp12" "L:\Databases\ASSET_REV_DUL.fmp12"
cmd.exe /c fmsadmin OPEN



What would cause that script to stop running after the first line executes?