title: How do I access the original file name that is associated a batch file
body: <p>I have created my own file extension and associated that file extension with a batch file, that is simply suppose to call a ruby script. So the ruby script will execute and modify the original file (Test.jim). However I need to pass the name of the original file to the ruby script so it can access it. My batch file is simply</p>
  
  <pre><code>ruby batrun.rb %0
  </code></pre>
  
  <p>However this passes the name/path of the batch file not the original file with my file extension. How can I pass this through the batch file.</p>
  
  <p>*EDIT</p>
  
  <p>As asked for this is how I associate my file extension with the batch file</p>
  
  <pre><code>Ftype jimfile="C:\Users\Server\Desktop\File Extension\Jimbat.bat" "%1"
  Assoc .jim=jimfile
  </code></pre>
  
  <p>I just put that in a batch file and then ran it.</p>