Windows scripting noob here. Say I've got the name of a .dll I need to delete or copy over, and I'm getting the classic "The file is in use by another process..." error. I know I can run tasklist with the /m switch and pass it the dll name. Then I can get the PID for the processes and kill them with taskkill.
How can I do this in one step in a batch file?