- How to auto-release file locks on NT/WIN2K server?

  • Thread starter Thread starter Dave Patrick
  • Start date Start date
D

Dave Patrick

From a command prompt;
net pause server
net sess /d /y
'will disconnect all users
'run your backup
net continue server


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| To facilitate scheduled updates, I wrote a small batch file that simply
| replaces certain application files on the server (NT4/WIN2K). Everything
| works fine and the files get updated as long as no one has them opened
| (these are network shared files and anyone in the company could be using
| them).
|
| Is there a way to make sure that the files that need to be replaced are
| released by the operating system (no mater who is using them, just release
| the locks) for the update to go through? In particular, I need something
| that I could use to auto-release locks on specific files (some sort of
batch
| script). Any idea how this should look like?
|
|
 
To facilitate scheduled updates, I wrote a small batch file that simply
replaces certain application files on the server (NT4/WIN2K). Everything
works fine and the files get updated as long as no one has them opened
(these are network shared files and anyone in the company could be using
them).

Is there a way to make sure that the files that need to be replaced are
released by the operating system (no mater who is using them, just release
the locks) for the update to go through? In particular, I need something
that I could use to auto-release locks on specific files (some sort of batch
script). Any idea how this should look like?
 
This may help.

http://www.sysinternals.com/ntw2k/freeware/psfile.shtml

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Disconnecting all the users and pausing the server is not an option since
it
| supports 24/7-type operations. What I really need is to release locks on
| specific files only, is that possible?
|
| For instance:
| :::::::::::::::::::::::::::::::::::::
| set srcdir= "\\server\UPDATES\"
| set destdir="\\server\APPFILES\"
| for each file in srcdir
| do(
| If file with the same name exists in destdir(
| release all locks
| )
| copy
| )
 
Disconnecting all the users and pausing the server is not an option since it
supports 24/7-type operations. What I really need is to release locks on
specific files only, is that possible?

For instance:
:::::::::::::::::::::::::::::::::::::
set srcdir= "\\server\UPDATES\"
set destdir="\\server\APPFILES\"
for each file in srcdir
do(
If file with the same name exists in destdir(
release all locks
)
copy
)
:::::::::::::::::::::::::::::::::::::
 
Back
Top