I have a batch (bat / cmd) file which should act as a filetype handler for jpeg files in Firefox, I just want it to copy the file to another folder, and then open the file in the Picasa Viewer. When I run it from the command line, even if I'm running it from another folder, it works fine, and opens Picasa Viewer. However, when setting it as the handler for jpeg files in Firefox, it only copies the file, but does not start Picasa.
Here is the script (I'm not a batch programmer so this could probably be a lot simpler, was just scraped together from various stackoverflow posts...):
set topath=%~DP0
copy %1 "%topath%"
@echo off
set picpath=%1
set picpath=%picpath:\=;%
set picpath=%picpath: =:%
for /F "tokens=* delims=;" %%i IN (%picpath%) DO call :LAST_FOLDER %%i
goto :EOF
:LAST_FOLDER
if "%1"=="" (
set LAST2=%LAST::= %
start explorer "%topath%"
start "C:\Programfiler\Google\Picasa3\PicasaPhotoViewer.exe" "%topath%\%LAST2%"
goto :EOF
)
set LAST=%1
SHIFT
goto :LAST_FOLDER
(I also tried opening just explorer on the folder, as seen above.) So, anyone know why neither explorer nor Picasa get started when run from Firefox, but both get started from the console? (Also, explorer gets started when drag-dropping a file on the script, however, Picasa does not...)