My Nikon D7200 is tethered via a cable to my PC and I have a lister setup to show the files from my memory card on my camera in the left pane and the right pane is the picture viewer. I would like Dopus to display the new file (photo) as it taken automatically and continue to do so as new files appear? Please help
Are the new files appearing in the file list, and the question is how to select them into the viewer?
Or is the problem that new files don't appear automatically, and require a manual refresh?
The files are appearing as I take them but I would like Dopus to automatically select the new files as it appears. This way the new file will be displayed in the viewer pane I can then make any necessary camera adjustments before taking my new shot.
- Take a photo
- New photo appears in Dopus left pane
- Dopus automatically selects new file
- New file is displayed in the viewer pane
- Go to 1!
I don't think there is a way to completely automate it (since scripts don't currently have an "OnNewFile" event or similar, mainly as it could be a huge performance bottleneck).
You could improve things by creating a button or hotkey which runs select DATE=newest SETFOCUS which will select the most recent file (by Modified date) and load it into the viewer. You'd still have to click a button or tap the keyboard after taking each photo, however.
But you can still use any other tool or technique to detect a change in that folder and trigger a command to select the incoming file.
This is a little powershell script that does exactly that. Run it from a cmd prompt like so: powershell.exe -noexit -executionpolicy unrestricted D:\Watch.ps1
[code]$DirectoryToWatch = "D:"
#fs watcher properties
$FSWProps = @{
Filter = '.'
Path = $DirectoryToWatch
NotifyFilter = [IO.NotifyFilters]"FileName"
IncludeSubdirectories = $False
}
#create new filesystemwatcher
$FSWatcher = New-Object System.IO.FileSystemWatcher -Property $FSWProps
#command to run on notification
$Action = {
$path = $Event.SourceEventArgs.FullPath
$name = $Event.SourceEventArgs.Name
write-host "A new file in town ($name)!"
sleep 2
&"D:\bin\file\dopus\dopusrt.exe" /cmd Select "$name" EXACT SETFOCUS
}
#attach to file-creation event
Register-ObjectEvent -InputObject $FSWatcher -EventName "Created" -Action $Action[/code]When finished taking photos, close the cmd prompt window to get rid of the filesystem watching behaviour.
Don't forget to adjust your paths to dopusrt.exe and the folder to watch. The script is not perfect and just a first shot, but there are chances it works nonetheless! o)
The camera may be mounted via MTP. If that's the case, it won't have a drive letter and FileSystemWatcher probably won't work on it.
(I'm guessing it's using MTP since it would be technically difficult to allow it to be mounted as a real drive on a computer while the camera was still able to write to it at the same time, unless the camera is sharing it as a network drive or something more advanced. Just a guess though; if it has a drive letter, the PowerShell approach could work.)
Yes, you're right, didn't thought of MTP! o) But it's not unlikely that the more recent cams are also able to write to network shares.
My panasonic wifi-enabled cams can do that e.g.. Maybe ako007, you still can pull some use out of it by not using MTP - in case you do! o)
I was curious and tested the script together with my cam, it works as expected, but the "sleep x" really needs to be adjusted to maybe 3 or more seconds if you transfer full size jpgs and even longer for raw files as the wifi transfer takes its time to finish. 4 megapixel jpgs at least, are fine with the 2 seconds delay for me. A perfect script would check wether the file is still being written before initiating the "select" in DO, otherwise the viewer won't show the image. As always, things arent't that easy as you would think. o)
Wow what a great response! Thanks to Leo (as always) and thanks to tbone for the script. BTW the camera is tether via a wired connection and the RAW files are 24Mb. Not sure how to mount my camera as a network drive? Should I connect my camera's wifi to my home network and mount it from there?
That will depend on the camera. 24MB files will probably be quite slow over wifi.
How is it mounted at the moment, using a cable? Do you get a drive letter for it? What's the path shown if you click on the Location bar to edit it while viewing the camera?
Hi Leo,
The camera is wired to a USB port.
There is no drive letter assigned to the camera and path is via MTP.
Cannot map a drive letter to the camera in the normal way?
What you can do will depend on the camera. If it has an option to mount as a drive letter instead of MTP then try that, but not all cameras have the option.
If it has a wifi option, that's also worth a try, but it can work in various ways.
By the way, it looks like Nikon themselves make tools which sound like they do exactly what you're aiming for: Nikon software.
Yeah I looked into the Nikon software but the paid version is the only one the supports tethering.
I am a Adobe Lightroom subscriber but tether support is not available for my camera model yet!
Dopus is so powerful that I thought it was worth a shot.
I will use the keyboard to select the new photo until Adobe gets their act together.
Many thanks for your efforts.
This might be interesting:
dpreview.com/articles/608980 ... ikon-users
Also consider searching the comments below, a software called "DSLR Dashboard" or something was mentioned, which serves the same purpose.
Maybe these (free?) alternatives work just as good or better. Don't own any Nikons to testdrive! o)