Find and delete resource files using batch file
I have never written a batch file so please be开发者_C百科ar with me.
I want to find resource file from current working directory of batch file. If it exist then I have stop aspnet_wp.exe process (if running) and delete this resource file. Later run resgen command to create a fresh resource file (new file name should be same as old one).
Take a look at the taskkill command. You can include a call to this to stop the process.
For example if the resource file is named "resource.txt",
IF EXIST resource.txt (
taskkill /im aspnet_wp.exe
del resource.txt
resgen
)
精彩评论