Is it possible to run ExifTool GUI from a USB Drive?
Thanks
Ken
Hi Ken,
I haven't tried, but I'm quite sure it will work from USB stick. Just make some folder (i.e. ET_GUI) and put Exiftool.exe + ExiftoolGUI.exe into it, and run GUI from there. After first execution, GUI will automatically create a small ini file inside this folder (this ini file contains several GUI settings) -beacause of this, GUI can't be run from read-only media (i.e. CD-ROM).
I believe Exiftool.exe (which is called from GUI) will write some data on HDD -which can be found (and deleted later, if neccessary) inside Windows Temp folder.
Greetings,
Bogdan
As Bogdan mentioned, exiftool unpacks files into a temporary directory the first time it is run. This temporary directory may be specified via environment variables so in theory it could be located on the USB drive if you want. See the PAR documentation notes (http://search.cpan.org/dist/PAR/lib/PAR.pm#Notes) for details.
- Phil
Phil
Thanks for the doc link!
Fortunately everything has worked OK using the Portable ExifTool GUI USB Drive on WinXP if JPGs are used but had problems with NEFs.
Will give the details in a separate post so not to confuse everyone.
Ken
Bogdan,
As previously mentioned everything seems to work on WinXP except No Images for RAW photos.
Most of the use of the Portable ExifTool GUI will be on WinXP PCs that I have no control over what WinXP updates and other files are installed.
Would like a small RAW image only as a check that I am viewing the correct photo.
Is it possible to have a Portable ExifTool GUI that is entirely self contained for RAW images (does Not depend on WinXP to show small RAW photos)?
Ken
Hi Ken,
I know exactly what you mean. Yes, it is possible (it always is :) ) to make GUI would show preview from raw. Btw. at very beginning of making GUI, I played with that idea, but have soon discovered, that it isn't "worth" to reinvent the wheel: there already exist 3rd party tools for that purpose -and I don't need to worry about changes which might (and do) happen inside various raw files in the future. To be honest, I was very happy when I "found" FastPictureViewer codec (after ArcSoft's plugin became obsolete) -otherwise, I would be forced to do it by myself.
I don't use any other tool than Exiftool, so I can hardly recommend some other exif editor for your needs. Maybe you should try with PhotoME, which seems to be very promising (see http://www.photome.de/roadmap_en.html).
Sorry to dissapoint you..
Bogdan
If ExifTool could look in the application directory first for the 'temporary' pearl files, then there would be no reason to write to the temp directory. There are often reasons that the temp directory is purged, requiring a re-write of the files when ExifTool is launched again. Also, if those files could be stored in the ET folder then it would be truely portable, and (hopefully) not be drive-letter dependant. Is there any way this could be accomplished?
As mentioned, you should be able to put the exiftool temporary files wherever you want by setting the appropriate PAR environment variable. This includes putting them in the application directory.
- Phil
Thanks for the reply, Phil.
"... by setting the appropriate PAR environment variable."
How do I go about setting this? I was hoping it doesn't require modifying settings on whatever computer I plug my USB flashdrive into.
Is there a way to set this variable in the app folder?
I'm trying to run exiftool(GUI) as a stand-alone 'Portable' application that is drive-letter independant and doesn't have to write a ton of stuff to the local computer's harddrive.
Sorry, I'm not a programmer.
Quote from: TT on April 20, 2010, 06:43:19 PM
How do I go about setting this?
From the command line, this could be done with a command something like this before running exiftool:
set PAR_GLOBAL_TMPDIR=F:\But I don't know how this would be done when running ExifToolGUI. Perhaps there is a way to set this in the Properties of ExifToolGUI.exe?
- Phil
Hi,
I've tried "set" and it works... but only as long console window (in which "set" was executed) is open and user executes commands there. Once console is closed, Windows (local) "set" variables are lost -meaning: everytime console window is opened (for Exiftool usage), user must take care to place "set" variable first.
IMO, the simplest way is... after Exiftool(GUI) usage, one deletes temp files manually (or using some *.bat script).
Bogdan
While others may be aware of this script, I had to look long and hard to find a way to delete the temp "par" folder ExifTool creates. While the average user won't have a use for this, I suspect that those who visit this forum are not typical ExifTool users and so might find it useful.
[batch file attached]
Mike Lee
Hi Mike,
Thank you for comming by with this idea.
Greetings,
Bogdan
Bogdan,
You are very welcome. I've now compiled this batch file into a tiny executable, which makes it very easy to use. I believe using RDpar.exe goes a long way towards making ExifToolGUI (i.e. ExifTool) "portable" as it deletes ExifTool's temp folder on virtually any Windows machine.
Mike
RDpar.exe (zipped) attached
Having a portable ExifTool (gui) is great. As far as the .bat file Mike created, two things. (1) You indicate "...deletes ExifTool's temp folder on virtually any Windows machine." Which OS or machine configurations did the .bat not work? (2) Where can one download this .bat, or has it become a built in feature of ExifTool (gui) since Aug 2010?
Ronin
Hi Ronin,
This .BAT file is included in the "RDpar.zip" attachment from an earlier post by Mike Lee.
Note that he attached files with this name to 2 posts. The first contains the .BAT, and the second contains the .EXE.
- Phil
Phil
Thanks for the info. I logged in to reply only, and logged out immediately without re-reading my post. The attachments were not available to me until I logged in and looked for them.
RoninV
Yes no problem , this wonderfull programm runs "himlself" no registry etc..
If you want again optimize (reduce size) for example keep in your SD card of your camera.
you can "crunch" (reduce) in Auto-executable (No Ask Zip here), i say auto-execute
Yo searche with windows the free and great prg named UPX (Ultimate Packer)
With him you can reduce the Exe to average 30% of this original size (ex 3Mo = 1Mo after)
okay ;)
For help you the best cmd line for best crunch is:
@C:\Util\UPx\Upx307.exe --force --best --ultra-brute --lzma --all-filters -k --overlay=strip --strip-loadconf=1 --crp-ms=999999 %1 --compress-exports=0
The %1 Here is for the Parameter transmit per "Drag & Drop" if you make one "Crunch.Bat" (for more easy to know)
If you use directly line of Cmd windows throught dos box, replace the %1 with "Your_Name_exe.exe"
Best regards Jpette
How to run ExifToolGUI/exiftool as portable...
1) Put the exiftool folder 'par-Owner' (and contents) in the ExifToolGUI folder (move it there from the %temp% folder).
2) Create a file 'StartExifToolGUI.bat' in the ExifToolGUI folder with the following three lines:
set HOMEDRIVE=
set TEMP=%CD%\par-Owner
start ExifToolGUI.exe
3) Now, run StartExifToolGUI.bat to launch ExifToolGUI. Program will now run from an external drive, etc., and won't create or need the exiftool folder and files in the %temp% directory.
Tested on WinXP. Let me know of any problems.
A good suggstion, thanks.
I can see one possible problem: Won't you be running as a different user on each system? (so the "par-Owner" directory name will be different.)
To get around this problem, it may be possible to specify the PAR temporary directory directly (probably by setting the PAR_GLOBAL_TEMP environment variable). See here (http://search.cpan.org/~rschupp/PAR-1.005/lib/PAR.pm#NOTES) and here (http://search.cpan.org/~rschupp/PAR-1.005/lib/PAR/Environment.pod) for details.
- Phil
Edit: Here is a thread with a similar discussion (https://exiftool.org/forum/index.php/topic,2897.html) for the command-line version, and here is another (https://exiftool.org/forum/index.php/topic,2585.msg.html).
Ah, yes. It's never easy. I guess 'par-Owner' would have to be 'par-whatever_the_username_is instead'. I'll look at the links you provided, but I wasn't able to get the environment variable ideas to work previously. Hopefully someone will have a solution for this little hurdle...
Actually, it doesn't matter what the username is. Just be sure that the line in the batch file "set TEMP=%CD%\foldername" points to the the correct folder. I just set 'foldername' to 'par-files' and renamed the folder on the flashdrive to match and all works well.
I don't understand this, because when running from the hard disk PAR looks for the temporary files inside "%TEMP%/par-Owner", but you say that it looks for them inside "%TEMP%" when running from the flash drive?
- Phil
No, if you use the batch file to launch ExifToolGUI, exiftool will look for the files in whatever folder is specified by "set TEMP=%CD%\foldername".
Just make sure that the folder 'foldername' is present in the ExifToolGUI folder. It must be pre-populated with the required exiftool files, however. If it's not, exiftool will create them in %temp% on the host system, as usual.
The following will fix a bug I discovered with my batch-file attempt to run ExifToolGUI without the 1,000 exiftool files and 73 folders being written to %temp% . Unfortunately, many 'cleanup' programs clear the temp directory, so it's necessary for this 10 MB of files and folders to be re-written each time exiftool runs after a cleanup.
For this to work, it's necessary to have a folder named "parfiles" inside the folder that contains ExifToollGUI.exe , exiftool.exe , and what I am calling StartExifToolGUIPortable.bat containing the following lines...
rename parfiles par-%USERNAME%
set HOMEDRIVE=
set TEMP=%CD%
start /wait ExifToolGUI.exe
rename par-%USERNAME% parfiles
Running the batch file will rename the "parfiles" folder to "par-user", where 'user' is the current username. When you quit ExifToollGUI the folder will revert to "parfiles".
Obviously you must be able to write to the disk where all the files exist. Only the first time the batch file is run, and each time exiftool.exe is updated, will the "parfiles" folder be populated with the necessary files.
Don't quit the DOS batch window that pops up .. quit ExifToollGUI to exit.
I hope this does the job...
Hi TT,
I've tried your solution and it seems to work very well. Just a notice for other visitors interested on this:
I can imagine, that this would be used from USB stick (read/write media, that is) most of the time. When the bat file is running for the very first time, GUI will appear quickly as supposed to. However don't just start clicking on GUI; wait until ExifTool finishes writting it's files into parfiles folder (watch blinking led on USB stick). After writting is finished (about 10Mbytes), you can start using GUI normally -if you start using GUI before writting is finished, GUI might show "Not responding". As mentioned, this is important only on first usage: next time you start bat file, there's no waiting.
Ok, back to topic... I'm no batch expert, so the question: is it somehow possible to run batch file inside hidden window? Or at least automatically minimize window? -just an idea.
Anyway, your solution is simple and elegant; so if you don't mind, I would add this on my "Metadata related articles" here (https://exiftool.org/gui/articles) -credit goes to you, of course :)
Bogdan
Bogdan,
There are some ways of running a batch file without the DOS window showing, but they require feeding the batch file into yet another program, so I chose not to go that route. Instead, I just Minimize (not Close!) the window. I'm hoping someone else has a solution for this.
One variation of the batch file I'm looking into is setting the temp folder to, say, the root directory of the flash drive. That way the same batch idea could be applied to other programs on the drive which call on exiftool so only one copy of all those little files is required on the drive which, by the way, takes over 37 MB! on the flash drive due to the 32kB cluster size.
Anyway, I don't have a problem with you posting this elsewhere with the usual 'use at your own risk' disclaimer.
Wayne (TT)
Hi Wayne,
I agree, that feeding batch from another program isn't the best idea; I just asked in case somebody would care about visible cmd-window. In short, I like the solution as it is: simple.
Of course, it depends on flash drive formatting settings, how much space temp files will occupy. But net total file size is about 10MB (~13MB occupied for default 4kB cluster size).
Bogdan
This slight variation of the batch file mentioned in Reply #24 will allow the ExifTool files to reside in the root directory of a flash drive. The advantage of this is that only one copy of these files is needed on the drive, which can be used by any program that calls ExifTool.exe . This way the different programs can each reside in their own folder, though each will require their own copy of ExifTool.exe AND their own batch file 'launcher' similar to this "StartProgram.bat" file...
rename \parfiles par-%USERNAME%
set HOMEDRIVE=
set TEMP=%CD:~0,3%
start /wait Program.exe
rename \par-%USERNAME% parfiles
Obviously "Program.exe" would be the name of whatever program was calling ExifTool, e.g., ExifToolGUI.exe .
As in the previous example, the first time the batch file is run and whenever ExifTool.exe is updated, the required files will be written to the "par-%USERNAME%" folder in the root directory. Upon exit the folder will be renamed to "parfiles" so that changing the computer or user won't require re-writing the ExifTool files.
My first post.... excuse me if resurrecting an old thread is a violation.
To automatically minimize the command prompt, we can create a shortcut to the .bat file and set 'Run -> Minimized' in the shortcut's properties. we can even set icon from the executable, in this case 'ExifTool GUI' for the shortcut. so launching the shortcut instead of the batch-file will keep the command prompt minimized.