I am currently running into an issue where a "cmd.exe" process remains active despite a particular service being stopped. This in turn is causing problems for an automated script that performs actions on the folder, preventing it from being renamed/moved/etc.
As my automated script runs from a BAT file, I believe I can kill it with TASKKILL. Using "Process Explorer", I searched for the folder name and it was able to locate the "cmd.exe" that was using it. I am having trouble finding a way to automate this though without some type of "Contains String". My pseudo example is...
taskkill /IM cmd.exe /FI "NAME contains TC38247178584278321320778"
php\php.exe migration.php TC38247178584278321320778