title: What is the longest file path allowed to be moved to Recycle Bin?
body: <p>For my application I'm testing the longest available file path to be allowed to be moved into the Recycle Bin and I'm getting interesting results.</p>
  
  <p>On Windows XP the maximum size is 259 characters, which is the <a href="http://msdn.microsoft.com/en-us/library/cc249520.aspx" rel="nofollow">MAX_PATH</a> constant minus 1.</p>
  
  <p>But on my Windows 8.1 Pro, that maximum allowed file path size somehow seem to be 215 characters.</p>
  
  <p>So I'm curious are there any official guidelines for this?</p>
  
  <p><strong>EDIT:</strong> OK, since posters below requested an API, I'm using <code>SHFileOperation</code> with <code>FO_DELETE</code> and <code>FOF_ALLOWUNDO</code> to place a user's file into the Recycle Bin. Since Windows Explorer uses the same exact API for its Delete operation it's easy to test it by making a long path within Windows Explorer and then by trying to delete it. In my experiments I can see the following:</p>
  
  <ul>
  <li><p><em>Windows XP</em>, if the total path length is 259 chars (on some editions, it may be 257??), the file/folder will be placed into the Recycle Bin. Otherwise Windows Explorer offers only an option to permanently delete it.</p></li>
  <li><p><em>Windows Vista</em>, this limit is 217 chars, inclusively.</p></li>
  <li><p><em>Windows 7 and 8</em>, it is 215 chars, inclusively.</p></li>
  </ul>
  
  <p>So it seems like this maximum limit is shrinking... Thus I was just curious, if this is documented somewhere in MSDN?</p>