Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a simple cmd batch file to deploy my MVC web application to server network share.

The problem I'm having is that my DLLs can't be simply replaced by new files since existing ones are in use by the IIS. I'm not an admin on the server so I don't have rights to run iisreset remotely.

What I can do is I can open root web.config file and save it, hence forcing IIS to stop my web application and as a result to this I can replace my assemblies.


Since I deploy my app using an automated batch file I'd like to include this web.config file re-save inside it before I start deploying DLLs. Anybody knows how can this be done in cmd? Maybe a change of the file's last modified timestamp would suffice.

Possibile solution

I suppose I could as well write a console application that would change last modified timestamp to DateTime.Now but I don't want to write the code myself. Anyone knows of such existing code on the net, since I can't find it. Or even a command prompt tool (console app without user interaction)?

share|improve this question
up vote 0 down vote accepted

Grab a copy of UnixUtils from, there is a command in there called touch which you can use to update the timestamp on the file as you need. Just copy the executable up with your batch file, and add a call to touch web.config and you should get what you need.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .