you need a touch utility. There are zillions of these on the web. Eg,
http://www.simtel.iif.hu/pub/pd/43977.html
or,
just save this into a batch file:
@echo off
setlocal
set r=%date%.%time%.%random%
@set r=%r:/=-%
@set r=%r: =-%
@set r=%r::=%
::may need to select the appropriate app directory here
::save current version as backup
echo backing up current web.config in web.config.%r%
copy web.config web.config.%r% >nul
::This line copies a file back onto itself, updating the timestamp
copy web.config + ,, >nul
endlocal
> Hi,
> Can someone please provide a code sample for:
> Load the web.config for a web app and add a space at the end of it or if
> there is space at the end then delete the space and then re-savethe file.
> The reason for thwe above being to force a restart of the web app.
> Thanks.