title: Deleting shortcuts in Windows using Python
body: <p>I have a batch file <strong>abc.bat</strong> which is used to run a Python script <strong>xyz.py</strong></p>
  
  <p><strong>abc.bat</strong> should run at startup and therefore has a shortcut in <em>C:\Users\abhishek.roy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup</em></p>
  
  <p><strong>abc.bat</strong> :</p>
  
  <pre><code>@echo off
  python xyz.py
  </code></pre>
  
  <p><strong>xyz.py</strong> : </p>
  
  <pre><code>import datetime
  import os
  
  if int(str((datetime.date.now() - datetime.date(2017,12,11))).split()[0]) &lt;= 15
      # Do something
  else:
      # Delete the shortcut from the startup folder
      # Need code here
  </code></pre>
  
  <p>The Python program should run for 15 days and after 15 days it should delete the shortcut from the Startup folder so that <strong>abc.bat</strong> stops running at startup. I have been trying 
  <code>os.remove("C:\Users\abhishek.roy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\abc.bat")</code> but it gives a <strong>FileNotFoundError</strong>. </p>
  
  <p>Please note that I do not want to delete the original <strong>abc.bat</strong>. I only want to delete the shortcut from the Startup folder.I would like to request any possible solutions.</p>
  
  <p>Thanks</p>