Here are two batch files that use trid.exe & perl.exe to copy flash video from firefox cache.
@echo off
rem Firefox Cache, Copy Most Recent Flash Video
cd %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default\cache
trid C:* |^
perl -pe "chomp" |^
perl -pe "s/File:/\n/g" |^
perl -ne "print if /\.FLV/" |^
perl -pe "s/^( C:[0-9A-Z]{8}d01).*/\1/" |^
perl -pe "chomp" |^
perl -pe "s/^/\@dir \/b\/o-d/" > dir.bat
call dir.bat |^
perl -ne "print if $.==1" |^
perl -pe "s/(.*)/copy C:\1 cache.flv > nul/" > copy.bat
call copy.bat
del dir.bat copy.bat
@echo off
rem Firefox Cache, Copy All Flash Video, Sort by Date
cd %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default\cache
trid C:* |^
perl -pe "chomp" |^
perl -pe "s/File:/\n/g" |^
perl -ne "print if /\.FLV/" |^
perl -pe "s/^( C:[0-9A-Z]{8}d01).*/\1/" |^
perl -pe "chomp" |^
perl -pe "s/^/\@dir \/b\/od/" > dir.bat
call dir.bat |^
perl -pe "s/(.*)/copy C:\1 cache.$..flv > nul/" > copy.bat
call copy.bat
del dir.bat copy.bat
Here are two batch files that use trid.exe, tr.exe & sed.exe to copy flash video from firefox cache.
@echo off
rem Firefox Cache, Copy Most Recent Flash Video
cd %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default\cache
trid C:* |^
tr -d "\n\r" |^
sed "s/File:/\n/g" |^
sed "/\.FLV/!d" |^
sed -r "s/^( C:[0-9A-Z]{8}d01).*/\1/" |^
tr -d "\n\r" |^
sed "s/^/@dir \/b\/o-d/" > dir.bat
call dir.bat |^
sed "1!d" |^
sed -r "s/(.*)/copy C:\1 cache.flv > nul/" > copy.bat
call copy.bat
del dir.bat copy.bat
@echo off
rem Firefox Cache, Copy All Flash Video, Sort by Date
cd %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default\cache
trid C:* |^
tr -d "\n\r" |^
sed "s/File:/\n/g" |^
sed "/\.FLV/!d" |^
sed -r "s/^( C:[0-9A-Z]{8}d01).*/\1/" |^
tr -d "\n\r" |^
sed "s/^/@dir \/b\/od/" > dir.bat
call dir.bat |^
sed "=" |^
sed "$!N;s/\n//" |^
sed -r "s/^([0-9]+)([0-9A-Z]{8}d01)/copy C:\2 cache.\1.flv > nul/" > copy.bat
call copy.bat
del dir.bat copy.bat
If batch is too slow, then use triddefspack.exe and video-flv.trid.xml to create a new definition file.
Here is another batch to copy files with a user given file type from firefox cache.
@echo off
rem Firefox Cache, Copy All File Type, Sort by Date
if "%~1"=="" goto :eof
cd %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default\cache
trid C:* |^
perl -pe "chomp" |^
perl -pe "s/File:/\n/g" |^
perl -ne "print if /\.%~1/i" |^
perl -pe "s/^( C:[0-9A-Z]{8}d01).*/\1/" |^
perl -pe "chomp" |^
perl -pe "s/^/\@dir \/b\/od/" > dir.bat
call dir.bat |^
perl -pe "s/(.*)/copy C:\1 cache.$..%~1 > nul/" > copy.bat
call copy.bat
del dir.bat copy.bat
For example, "myscript.bat png" would copy files with file type .PNG from firefox cache.
Thanks Mark0 for a great utility!
PS-
Mark0, maybe give a warning when triddefspack.exe is about to overwrite triddefs.trd or create a .bak file.