title: For Loop with nested Forfiles only works if batch is in same folder
body: <p>My code works fine when I have the <em>.bat</em> in the "<em>%USERPROFILE%\Downloads</em>" folder which is where I want it to look for <em>.zip</em> files. I just can't work out how to point here if the <em>.bat</em> lives elsewhere. If I move the <em>.bat</em> to another location there is no output, the file doesn't appear to do anything.</p>
  
  <p>I have tried adding the following before the [FOR] command but this doesn't seem to help. 
  Any advice would be greatly appreciated.</p>
  
  <pre><code>CD %USERPROFILE%\Downloads
  </code></pre>
  
  <p>Here is my code...</p>
  
  <pre><code>@echo off
  setlocal EnableExtensions DisableDelayedExpansion
  for %%F in (EPSG*.zip) do (
   for /F "tokens=1,* delims=|" %%K in ('
    forfiles /p "%USERPROFILE%\Downloads" /m "%%~F" /c "cmd /c echo @FDATE^|@FTIME"
      ') do (
     setlocal EnableDelayedExpansion  
       set "name=%%~F"
       set "timestamp=%%~K %%L"
       set "timestamp=!timestamp:/=-!"
       set "timestamp=!timestamp::=.!"
       set "destpath=%USERPROFILE%\Downloads\Nearmap Downloads\!timestamp!"
       powershell -command "Expand-Archive -Force -Path '!name!' -DestinationPath '!destpath!'"
       endlocal
      )
  )
  pause
  </code></pre>