Why can’t Windows move a document that is opened in Word?

2.07K views

Why can’t Windows move a document that is opened in Word?

In: Technology

4 Answers

Anonymous 0 Comments

As others mentioned, Windows has strong conventions for telling other programs (and even the operating system) that a file is currently being operated on by a program. To simplify programming, many Windows programs simply flag a file as locked when it’s opened and arrange for the lock to be released when the file is closed (either intentionally, or because the program closed).

What you’re observing happens because Word tells other programs it’s working on the file the moment it’s opened, and only releases this lock when the file is closed.

Just a note that this is just a strong convention on Windows. In other operating systems, these conventions for locking files are less universal. For example, on operating systems that are a form of Unix (Linux, MacOS, Android, iOS) most programs will store the files they have opened somewhere else, and only write the entire files to disk when you hit Save. This minimizes the chance of data corruption, while avoiding the headache of coming up with a universal conversion for locking files. Where locks are required, programs usually come up with their own method…but this is tricky, because on UNIX, it is not uncommon for files to be opened by programs running on different machines. Performing file locking in these scenarios is…kinda tricky. For example, what if a program on another machine locks a file on yours and it’s internet connection drops?

You are viewing 1 out of 4 answers, click here to view all answers.