title: Batch file Start program
body: <p>M'kay, so I've written a few batch files before, so I'm not completely new to them, but this is stumping me. What I'm trying to do is run a .exe file from a batch file. Here's the Batch script:</p>
  
  <pre><code>@echo off
  :start
  setlocal EnableDelayedExpansion
  cd "C:\Users\Zac\Dropbox\SoundCloud"
  set n=0
  for %%f in (*.html*) do (
  set /A n+=1
  set "file[!n!]=%%f"
  )
  set /A "rand=(n*%random%)/32768+1"
  move "!file[%rand%]!" C:\Users\Zac\Temp
  start "~dp0Link_Open.exe"
  echo %time%
  timeout 70 &gt; NUL
  echo %time%
  goto start
  </code></pre>
  
  <p>So from my understand, this moves a random .html file from one directory to another, this works, I've used it a lot, the only issue is the "Start" command, I don't use this very often. the "Link_Open.exe" is in the same folder as my .bat, but I've tried running it with the full directory written in, I've tried quotations, no quotations, brackets, no brackets, START, start, Start, Call, CALL, call, and none of them work, I'm always getting the same error "Link_Open.exe cannot be found, have you written it correctly"</p>
  
  <p>The only reason I can possibly think of that would be why it wouldn't work, is that the .exe was written in AutoIT and then compiled...but that shouldn't effect it should it?</p>
  
  <p>Running the batch file will result in a random file being moved, and then an error coming up, and then repeating.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Ps: Running the Link_Open.exe does what it's supposed to do, so there's no errors there, the only issue I'm having is opening it with .bat.</p>
  
  <p>I'm still very new to Autoit, but if someone could show me a script to move a random .html file with Autoit, I could just combine the two scripts together couldn't I?</p>