Question

Locked

How can a user view who has a shared file open?

One of our groups have a shared XSLX file that they edit on a daily basis. The problem is that if someone else has the file open, they are unable to edit it. How can I allow them to see who has the file open?

Upon opening the file, all it says is that 'another user' has the file open and doesn't show the actual username so they contact IT to tell them who is in the file. I can see who has the file open by going into Share and Storage Management or by using the 'net file' command.

What I was trying to do in order to eliminate installing any 3rd party software on their machines is to create a simple batch file that they could run to view who has the file open. Or if there is a way to make the actual username appear when they open the file instead of 'another user' that would be great too.

Does anyone have any suggestions for this?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Idea

by JPElectron In reply to How can a user view who h ...

What if, instead of letting them "open" the file directly - you make a shortcut that would work like this...

All user's would need to open "the XSLX file.lnk" which is a shortcut to a .bat
The .bat looks for filelock.txt, if present it tells the user the file is open...

@ECHO OFF

REM filelock.txt is present, tell us who did it...
if exist filelock.txt type filelock.txt
pause
goto end

REM filelock.txt is not present, so write the user who is about to open it...
if not exist filelock.txt echo File open by %username% at %date% %time% > filelock.txt
REM then open the file for this user...
start "file" /D [starting_directory] /WAIT [full_path_to_file]
goto end

:end
exit

Collapse -

Reponse To Answer

by dmritchie2 In reply to Idea

You would need to add after
start "file" /D [starting_directory] /WAIT [full_path_to_file]

pause
del filelock.txt


goto end

:end
exit
Otherwise the filelock.txt will never go away.

Back to Storage Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums