title: Is there a way to observe a file's 'availability status' via Windows command?
body: <p>Our custom-built software has a problem with the way Microsoft OneDrive locks and syncs files that's in use. Due to this we have decided not to support cloud save files. The idea is that when a user points a load or save at a location that syncs to cloud a popup will notify them that it's not supported.</p>
  
  <p>My problem is identifying the said location. While the easiest way would be to look for the folder name 'OneDrive', I feel like that is not foolproof since the folder's name can be changed.</p>
  
  <p>I thought about checking if the file has an 'availability status' since that shows in explorer if the file is in the cloud, local, or sync-enabled.
  Unfortunately I couldn't find any way to check that status other than visually, since I couldn't manually find references to the feature in the registry, command prompt or even the events log.</p>
  
  <p>Example image:</p>
  
  <p><img src="https://i.imgur.com/qTw3S4o.jpg" alt=""></p>
  
  <p>Is there a command or method to find out this status of a file or folder like with the <code>attrib</code> command? As a final resort, perhaps Powershell can solve my problem?</p>
  
  <p><strong>EDIT:</strong> <br>
  <strong>Gerhard Barnard</strong>'s solution worked for me. Here's a visual.</p>
  
  <p><em>(Thank you editors for turning these links into pictures while I rack up enough points for SO to trust me)</em> <br>
  <a href="https://i.imgur.com/VSGvSKD.jpg" rel="nofollow noreferrer">https://i.imgur.com/VSGvSKD.jpg</a> <br>
  <a href="https://i.imgur.com/P5reVIC.jpg" rel="nofollow noreferrer">https://i.imgur.com/P5reVIC.jpg</a></p>
  
  <p>This is also available using <code>attrib</code>. <br>
  <a href="https://imgur.com/Yejeb4r" rel="nofollow noreferrer">https://imgur.com/Yejeb4r</a></p>
  
  <p>As mentioned by <strong>aschipfl</strong>, these features could possibly be absent on your system for reasons unknown as Microsoft's documentation seems outdated, however testing is underway.</p>
  
  <p><strong>EDIT2:</strong> <br>
  I believe for these features to be available you should have OneDrive installed. It generally runs from C:\Users[username]\AppData\Local\Microsoft\OneDrive\OneDrive.exe. I'm contemplating simply looking for this file instead of inspecting folder contents before saving and prompting my users.</p>