@echo off REM Define source and destination paths set "sourcePath=D:\Msi…
- User
@echo off
REM Define source and destination paths set "sourcePath=D:\Msi AftherBurner\MSI Afterburner my last save\Program Files (x86)" set "destinationPath=C:\Program Files (x86)"
REM Copy 'MSI Afterburner' folder xcopy "%sourcePath%\MSI Afterburner" "%destinationPath%\MSI Afterburner" /E /I /Y
REM Copy 'RivaTuner Statistics Server' folder xcopy "%sourcePath%\RivaTuner Statistics Server" "%destinationPath%\RivaTuner Statistics Server" /E /I /Y
echo Folders copied successfully.
REM Run MSIAfterburner.exe start "" "%destinationPath%\MSI Afterburner\MSIAfterburner.exe"
REM Run RTSS.exe start "" "%destinationPath%\RivaTuner Statistics Server\RTSS.exe"
REM Wait for 7 seconds timeout /t 7 /nobreak > NUL
REM Close the applications taskkill /IM MSIAfterburner.exe /F taskkill /IM RTSS.exe /F
REM Run MSIAfterburner.exe again start "" "%destinationPath%\MSI Afterburner\MSIAfterburner.exe"
REM Run RTSS.exe again start "" "%destinationPath%\RivaTuner Statistics Server\RTSS.exe"
echo Applications restarted successfully. pause
I have this script, after I run it, it works fine, but if I want to delete the folders: MSI Afterburner and the folder RivaTuner Statistics Server I get this message: Folder in use
The operation cannot be completed because the folder or file inside it is open
in another program
A clasp is opened and folded again
Close the folder or file and try again.
MSI Afterburner
I want the script to close after it finishes and not run itself or its process in the background Can this help?
- Assistant