title: Where are IntelliJ scratch files located?
body: <p>In IntelliJ IDEA 14, we can create scratch files from <strong>Tools > New Scratch File...</strong></p>
  
  <p>Are they stored in some temporary files? If the answer is yes, where are they?</p>
  
  <p><strong>Attempts:</strong></p>
  
  <p>1) I pressed right click > Copy Reference and I pasted it:</p>
  
  <blockquote>
    <p>1d0b26a2/scratch.2:1</p>
  </blockquote>
  
  <p>2) I opened <strong>.idea\workspace.xml</strong> and I have the following part for scratch files:</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;file leaf-file-name="scratch.2" pinned="false" current-in-tab="true"&gt;
      &lt;entry file="scratchpad://1d0b26a2/scratch.2"&gt;
        &lt;provider selected="true" editor-type-id="text-editor"&gt;
          &lt;state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="636"&gt;
            &lt;caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="20" /&gt;
            &lt;folding /&gt;
          &lt;/state&gt;
        &lt;/provider&gt;
      &lt;/entry&gt;
    &lt;/file&gt;
  </code></pre>
  
  <p>For a normal file the entry path starts with <code>file://</code> instead of <code>scratchpad://</code>.</p>