To be more specific, I would like to use a batch file to load "Program X". Then once the program is fully loaded and open on the screen, move a few files from "Folder A" to "Folder B". Then when Program X is manually exited, move the previously moved files back to Folder B. Here is what I tried, but didn't work. I didn't think it would.
start "" "C:\ProgramX.exe"
move /-y "C:\FolderA\File1.txt" "C:\FolderB\"
move /-y "C:\FolderA\File2.txt" "C:\FolderB\"
/wait "C:\ProgramX.exe"
move /-y "C:\FolderB\File1.txt" "C:\FolderA\"
move /-y "C:\FolderB\File2.txt" "C:\FolderA\"
Originally I made two separate batch files that simply move the files back and forth (I manually open and close the program) and it works, but I would like to have just one batch file that loads the program, then moves the files and then moves them back once I have exited the program.