A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to access my camera in a batch file?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old April 21st 18, 04:37 PM posted to alt.comp.os.windows-10
Ken Blake[_5_]
external usenet poster
 
Posts: 2,221
Default How to access my camera in a batch file?

On Fri, 20 Apr 2018 15:27:17 +0200, Fokke Nauta
wrote:


I do have a card reader, but connecting the camera by USB is a bit easier.



Not for me. First, I would have to find the cable.

Even if my cable was easy to find, the difference in time between
plugging in a cable or opening the camera and putting the card in a
reader is insignificant--at most a second or two.

Ads
  #17  
Old April 21st 18, 06:16 PM posted to alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default How to access my camera in a batch file?

In article , Wolf K
wrote:

or, 'the cloud' could simply be wifi sync when the camera is within
range of one's own home wifi network.

Interesting use of 'cloud'.


what else would you call it when there are no cables involved?


Wifi network?

I've only ever seen "cloud" used for on-line services.


it's a personal cloud, one which has a very limited range and users.
  #18  
Old April 21st 18, 06:52 PM posted to alt.comp.os.windows-10
Fokke Nauta[_4_]
external usenet poster
 
Posts: 587
Default How to access my camera in a batch file?

On 21/04/2018 16:56, VanguardLH wrote:
Fokke Nauta wrote:

I do have a card reader, but connecting the camera by USB is a bit easier.


That's what I thought, too, when I got the first few digital cameras.
It is easier for file transfer except that for some, maybe many, cameras
their battery gets drained while the USB cable is attached. They don't
get power via the USB cable from the computer. They activate their USB
mode (camera powers up) but use the camera's battery.

I'd end up forgetting to disconnect the USB cable after doing the file
transfer and the camera's battery would die. If rechargeable then out
they'd come and into the charger; else, toss the dead ones and put in
new ones. Having to replace/recharge the batteries obviates the
ease-of-use with the USB cable versus moving the SD card to a card
reader in the computer.

I wasn't aware the camera battery was getting drained until after the
first couple times of using the USB cable. Hmm, the battery is dead but
then maybe it was already weak. Next time, battery went dead but I just
put in fresh batteries. Learned to do the file transfer and then unplug
the USB cable so the camera would shut off. However, file transfer
seems very slow. Transferring a week's worth of vacation pics where I
got ridiculous on pic count would take a long time during which the
camera's battery was draining.

Don't know what digital cameras do nowadays about whether or not they
use the +5V power via USB cable. My last digital camera broke after
getting doused in an unbelievably hard down pour (hard to even breathe)
that hit so fast that I didn't know it was coming. Haven't bothered
buying any more since then. Photography hasn't much of a passion and
never a profession to me.


Well, photography is my passion. Almost each dy I make one or more
pictures. That's why I can't be bothered to get the SD card out of the
camera and put it in the reader. Connecting my camera by USB is much
more easier. Fully agree that it drains the battery, but that is where
chargers and spare batteries are for.

The camera's I have can be charged by the USB cable but I don't do that.
I have fully charged spare batteries, and insert them when the camera's
battery is flat.

I only put the SD card in the reader after a holiday, with hundreds of
images.

Fokke
  #19  
Old April 21st 18, 06:54 PM posted to alt.comp.os.windows-10
Fokke Nauta[_4_]
external usenet poster
 
Posts: 587
Default How to access my camera in a batch file?

On 21/04/2018 17:37, Ken Blake wrote:
On Fri, 20 Apr 2018 15:27:17 +0200, Fokke Nauta
wrote:


I do have a card reader, but connecting the camera by USB is a bit easier.



Not for me. First, I would have to find the cable.

Even if my cable was easy to find, the difference in time between
plugging in a cable or opening the camera and putting the card in a
reader is insignificant--at most a second or two.


That's true. But I take a picture almost every day, and connecting the
camera by USB is faster and far easier.
After a return from a holiday I have hundreds of image, and then I put
the card in the reader.

Fokke
  #20  
Old April 22nd 18, 11:18 AM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default How to access my camera in a batch file?

nospam wrote:
In article , Fokke Nauta
wrote:

[...]
So I have to wonder if there is a connection "mode" select in the camera
to pick PTP, MTP, or other file transfer mode.


There is no option for this available in the menu of the camera.
I found out the camera uses PTP. I found the PTPDriver software, which I
installed - free, with some limitations. It worked well, apart from the
limitations, and I just purchased the full version, $ 29,95. Now waiting
fo the key.


you wasted your money. there is no need to install anything.


Please note that the 'Subject:' is "How to access my camera in a batch
file?".

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share. The camera was not presented
as either of those, so Fokke *did*/does need extra software. He selected
to try/buy the PTPDriver software, which - as he mentioned - presents
the camera as a drive (letter). Problem solved.

[...]
  #21  
Old April 22nd 18, 03:20 PM posted to alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default How to access my camera in a batch file?

In article , Frank Slootweg
wrote:

So I have to wonder if there is a connection "mode" select in the camera
to pick PTP, MTP, or other file transfer mode.

There is no option for this available in the menu of the camera.
I found out the camera uses PTP. I found the PTPDriver software, which I
installed - free, with some limitations. It worked well, apart from the
limitations, and I just purchased the full version, $ 29,95. Now waiting
fo the key.


you wasted your money. there is no need to install anything.


Please note that the 'Subject:' is "How to access my camera in a batch
file?".


i did see that, and it's not relevant.

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.


the batch file can be modified to deal with unc.

better yet, use existing software that handles it already, without any
hassles.

The camera was not presented
as either of those, so Fokke *did*/does need extra software. He selected
to try/buy the PTPDriver software, which - as he mentioned - presents
the camera as a drive (letter). Problem solved.


with additional expense he did not need to spend.
  #22  
Old April 22nd 18, 06:05 PM posted to alt.comp.os.windows-10
Fokke Nauta[_4_]
external usenet poster
 
Posts: 587
Default How to access my camera in a batch file?

On 22/04/2018 16:20, nospam wrote:
In article , Frank Slootweg
wrote:

So I have to wonder if there is a connection "mode" select in the camera
to pick PTP, MTP, or other file transfer mode.

There is no option for this available in the menu of the camera.
I found out the camera uses PTP. I found the PTPDriver software, which I
installed - free, with some limitations. It worked well, apart from the
limitations, and I just purchased the full version, $ 29,95. Now waiting
fo the key.

you wasted your money. there is no need to install anything.


Please note that the 'Subject:' is "How to access my camera in a batch
file?".


i did see that, and it's not relevant.


Not relevant?

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.


the batch file can be modified to deal with unc.

better yet, use existing software that handles it already, without any
hassles.

The camera was not presented
as either of those, so Fokke *did*/does need extra software. He selected
to try/buy the PTPDriver software, which - as he mentioned - presents
the camera as a drive (letter). Problem solved.


with additional expense he did not need to spend.


Bull****.
Please go and moan somewhere else.

Fokke
  #23  
Old April 22nd 18, 08:09 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default How to access my camera in a batch file?

nospam wrote:
In article , Frank Slootweg
wrote:

So I have to wonder if there is a connection "mode" select in
the camera to pick PTP, MTP, or other file transfer mode.

There is no option for this available in the menu of the camera.
I found out the camera uses PTP. I found the PTPDriver software,
which I installed - free, with some limitations. It worked well,
apart from the limitations, and I just purchased the full
version, $ 29,95. Now waiting fo the key.

you wasted your money. there is no need to install anything.


Please note that the 'Subject:' is "How to access my camera in a batch
file?".


i did see that, and it's not relevant.


Sigh! Yes, it *is* relevant. Read on.

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.


the batch file can be modified to deal with unc.


Exactly *which* part of "The camera was not presented as either of
those" didn't you understand?

Moral: Read ahead before responding or edit your response after you've
read the rest.

better yet, use existing software that handles it already, without any
hassles.


*Which* 'existing software'? (As you've been told a zillion times,)
Without being specific, saying things like 'use existing software' is
meaningless, unhelpful and silly.

The camera was not presented
as either of those, so Fokke *did*/does need extra software. He selected
to try/buy the PTPDriver software, which - as he mentioned - presents
the camera as a drive (letter). Problem solved.


with additional expense he did not need to spend.


And the free software which does this is called what and is documented
at which URL?
  #24  
Old April 22nd 18, 08:34 PM posted to alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default How to access my camera in a batch file?

In article , Frank Slootweg
wrote:

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.


the batch file can be modified to deal with unc.


Exactly *which* part of "The camera was not presented as either of
those" didn't you understand?


what part of it doesn't need to be presented as a drive letter or
network share is not clear?

cameras use ptp, which windows supports (and macos for that matter), no
additional drivers required.

numerous photo apps can copy photos directly without any additional
drivers, which means a batch file can also copy them.

he might need to modify his batch file, but that just means he didn't
write it properly to handle all situations. consider it a bug fix.

Moral: Read ahead before responding or edit your response after you've
read the rest.


i read the whole thing and am *very* familiar with all sorts of photo
software.

better yet, use existing software that handles it already, without any
hassles.


*Which* 'existing software'? (As you've been told a zillion times,)
Without being specific, saying things like 'use existing software' is
meaningless, unhelpful and silly.


just about any photo asset manager or photo editing software can either
automatically copy photos when a camera is attached or on request for
those that prefer manual copy, including adobe lightroom, on1, dxo and
certainly nikon's own software (he has a nikon d5100).

if those apps can copy without an additional drivers, then so can his
batch file.

tl;dr - he needs to fix his batch file, or better yet, not use a batch
file at all since the apps do a much better job of copying and managing
photos.
  #25  
Old April 23rd 18, 07:36 AM posted to alt.comp.os.windows-10
Fokke Nauta[_4_]
external usenet poster
 
Posts: 587
Default How to access my camera in a batch file?

On 22/04/2018 21:34, nospam wrote:
In article , Frank Slootweg
wrote:

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.

the batch file can be modified to deal with unc.


Exactly *which* part of "The camera was not presented as either of
those" didn't you understand?


what part of it doesn't need to be presented as a drive letter or
network share is not clear?

cameras use ptp, which windows supports (and macos for that matter), no
additional drivers required.

numerous photo apps can copy photos directly without any additional
drivers, which means a batch file can also copy them.

he might need to modify his batch file, but that just means he didn't
write it properly to handle all situations. consider it a bug fix.

Moral: Read ahead before responding or edit your response after you've
read the rest.


i read the whole thing and am *very* familiar with all sorts of photo
software.

better yet, use existing software that handles it already, without any
hassles.


*Which* 'existing software'? (As you've been told a zillion times,)
Without being specific, saying things like 'use existing software' is
meaningless, unhelpful and silly.


just about any photo asset manager or photo editing software can either
automatically copy photos when a camera is attached or on request for
those that prefer manual copy, including adobe lightroom, on1, dxo and
certainly nikon's own software (he has a nikon d5100).

if those apps can copy without an additional drivers, then so can his
batch file.

tl;dr - he needs to fix his batch file, or better yet, not use a batch
file at all since the apps do a much better job of copying and managing
photos.


You haven't got a clue as to why I need to use a batch file. And I'm not
going to be bothered to explain it to you. As from now on nospam will
get stuck in my spam filter.

Fokke
  #26  
Old April 23rd 18, 11:02 AM posted to alt.comp.os.windows-10
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default How to access my camera in a batch file?

Fokke Nauta wrote:

nospam wrote:

if those apps can copy without an additional drivers, then so can his
batch file.

tl;dr - he needs to fix his batch file, or better yet, not use a batch
file at all since the apps do a much better job of copying and managing
photos.


You haven't got a clue as to why I need to use a batch file. And I'm not
going to be bothered to explain it to you. As from now on nospam will
get stuck in my spam filter.


You're starting to understand nospam. Nospam knows everything about
everything and anything other than what he knows is not relevant or not
possible.

As for requiring a driver, that depends on the hardware vendor. A
driver is merely the interpretive interface to communicate to the
device: OS or apps communicate with the driver and driver communicates
directly to the hardware. A driver is not required if the hardware
vendor intends that you ONLY use their software to interface with the
hardware. They can build a driver with the logic to interface with
their hardware or they can put that logic into their software which
becomes the only means to interface with their hardware. I've seen this
with some scanners: no driver so the OS and apps cannot access the
device and you must use the vendor's software which knows the protocol
to directly communicate with their device.

Oh yes, if a device needs a driver then a vendor of discontinued
hardware will always and forever supply a driver for that hardware.
This proves that nospam never keeps any hardware beyond its support
period by its vendor. Drivers run at kernel level (ring 0). Oh yes, we
certainly are going to use drivers from an unknown and untrusted source.
Uh huh. nospam assumes that someone somewhere will save the appropriate
driver for your specific hardware and without alteration and will make
it discoverable via Internet searching.

That nospam thinks the included software with a device is the end-all
method to access a device shows he is purely an end-user. He submits to
the limitations of that software and never wants to perform any other
operations involving that hardware.


Back to the topic which is relevant regardless of nospam's claims ...

- So where (URL) did you find the PTPdriver software? That's too vague
a product name to find in an online search. I'm curious about it: who
makes it, why it is needed, what it does). I'd like to see if it is a
driver, a miniport definition of the PTP/MTP miniport driver that
should've been included in Windows, or a table of devices and
provides its own direct interface to that specific hardware. Could be
your camera only supports MSC (Mass Storage device Class) and
PTPdriver converts it to a PTP device as seen by the OS. There is
also PTP software that enhances the PTP specification to support
additional features in hardware.

- I don't have the Nikon D5100. When I found its online manual, there
was no mention of PTP; however, that could be an omission because they
assumed the OS had PTP support that already worked with their camera.
I didn't find "PTP" when I searched their online manual. How do you
know that camera supports PTP (here comes nospam with his claims
because he's God) and that, for example, the PTPdriver software you
bought doesn't just emulate the MSC device (your camera) as a PTP
device to the OS? I didn't find "PTP" in the manual so how do you
know that camera supports PTP (and not just, say, MSC)?

http://imaging.nikon.com/lineup/dslr/d5100/spec.htm

That mentions DCF (the file system on the camera) but not PTP or MTP
or any file transfer protocol (over the USB hardware protocol).

https://www.dpreview.com/reviews/nikond5100

Nothing there, either, about MSC, PTP, or MTP. That the PTPdriver
makes the camera appear as a PTP device to the OS doesn't mean the
device actually itself support PTP.

PTP was designed only for file transfer of still pictures. MTP
handles music files and movies. Your camera doesn't have a movie
mode (which means it should support MTP)? The manual says it does.

While I found reference to ViewNX 2, that might be just their photo
management program. Page 63 of the manual says (after plugging in the
camera to a Windows host via USB cable):

If a message is displayed prompting you to choose a program, select
Nikon Transfer 2.

From the download page for ViewNX 2, Nikon Transfer 2 is mentioned.
Installing ViewNX 2 appears to also install Nikon Transfer 2. Again,
I don't have the D5100, so I don't have this software to see if it is
a driver, an INF miniport, or a background program or service that
provides direct interface with the hardware. From:

http://nikonimglib.com/nvnxi/onlineh.../tr017500.html

looks like it could be just another program to provide a GUI method to
users for file transfers. I can't tell if it is just a program,
included a driver, relies on PTP or MTP, or directly interfaces with
the hardware (no driver). When I search on "nikon d5100 driver", the
articles keep pointing at the ViewNX software. Remember that
installing user-mode software does not preclude the installer from
including drivers. You might have to install their software package
to get the [miniport] driver and just ignore their cutsy programs.

Finally found a user claiming the D5100 does support PTP (so I have to
wonder why PTP support was broken in your OS instance). See:

https://tekonomist.wordpress.com/201...on-d5100-dslr/

Just be aware that a PTP device does *not* create a drive letter
assignment to the device by the OS. What you saw was a UNC path to
the discovered device. Something else would need to assign the drive
letter, like a [miniport] driver, a service, or background process as
a startup program, or software you use to access the device (if it
even needs to bother with a drive letter).

PTP is just a communications protocol, not an OS-dependent drive
manager. If MSC were still supported, plugging in the camera would
make it look to Windows like a mountable file system, so a drive
letter would get assigned. The camera would look like any other MSC
device, like a USB flash drive or HDD. Going from MSC to PTP meant
losing the USB MSC class definition. As noted in the Wikipedia
article to which I previously noted:

A disadvantage of PTP on Windows as compared to USB mass storage is
that Windows does not assign drive letters to PTP devices, so image
files on them cannot be manipulated by scripts or standard Windows
programs, only by Windows Explorer or applications with specially
written PTP support.

However, see if using "net use" described at the end works on the UNC
path that Windows assigned to the PTP camera.

- Some users had to install the MTP kit to get their USB devices working
again at MTP devices.

https://docs.microsoft.com/en-us/pre...614016(v=vs.85)

- You bought more software and that solved your problem. Unlike
nospam's contention, to you it was probably money well spent. Didn't
have to troubleshoot any further. It was easier to buy a new wheel on
which to put your old tire than to get a shop to smack a bent wheel
back into balance and alignment.

Did you ever try installing the ViewNX 2 software? Do an image
backup, uninstall PTPdriver (and check if the problem remains
accessing the camera), install and test Nikon's free software
software, and if you don't like it or it doesn't resolve you problem
then uninstall it (or use the backup image if their install fails or
is incomplete). Even if you don't use their programs, it might
provide the driver needed to interface to that camera.

I remember having a Fuji camera that was not usable (could not get at
its files) until I installed their software. I didn't use their
programs (they sucked), especially since I just wanted to use commands
or a GUI (e.g., Windows Explorer) to access the hardware object to get
files from it. I just needed the driver (or perhaps just the INF
miniport definition) to access the camera.

I found ViewNX 2 at:
http://downloadcenter.nikonimglib.co...oad/sw/20.html

- If Nikon isn't providing an actual driver but relies on a miniport
driver (INF file), maybe it is missing. Installing their software
might add it. Could be they reply on the "Windows Portable Devices
Media Transfer Protocol" file (Wpdmtp.inf) under C:\Windows\Inf but it
is missing. When I looked in my copy on Windows 7, looks to be mostly
for defining the MTP USB class devices but there are some PTP entries.

https://docs.microsoft.com/en-us/win...on---inf--file

https://windowsreport.com/media-tran...l-not-working/
(Mentions how to update the driver, even if using the same one
again, or to reinstall the wpdmtp.inf MTP USB class definition
file.)

- You gave "This PC\D5100\Removable storage\DCIM\100D5100" as the UNC
path to the camera. That means the device was discoverable by the OS.
PTP doesn't assign a drive letter so you got a UNC path. However, you
don't want to use or cannot use UNC pathing to identify the target in
your batch file(s). Did you try using the net.exe program included in
Windows to assign a drive letter to the UNC path in your batch files,
as in:

net use t: "\\This PC\D5100\Removable storage\DCIM\100D5100"

where, in this case, t is the drive letter to associate to the UNC
path. Obviously you change t to whatever drive letter you want that
won't conflict with existing assignments or those that will appear
later when you plug in other devices. At the end of the batch file,
and if the camera doesn't need a drive letter assignment thereafter,
use:

net use t: /delete

You can run "net use /?" for more help.

(Despite not supporting his claim with how to facilitate accessing a
UNC path in a batch file, I'm sure now after showing how to do this
that nospam will use it as his argument that you didn't need to buy
more software.)

Some more help on using "net use":
https://www.howtogeek.com/118452/how...pt-in-windows/
(found via https://www.google.com/search?q=net%...drive%20letter)

  #27  
Old April 23rd 18, 11:25 AM posted to alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default How to access my camera in a batch file?

In article , Fokke Nauta
wrote:

tl;dr - he needs to fix his batch file, or better yet, not use a batch
file at all since the apps do a much better job of copying and managing
photos.


You haven't got a clue as to why I need to use a batch file. And I'm not
going to be bothered to explain it to you.


if you're not going to explain exactly what you want to do and why a
batch file is the only acceptable solution, then the advice you get
won't be very useful.
  #28  
Old April 23rd 18, 12:30 PM posted to alt.comp.os.windows-10
Fokke Nauta[_4_]
external usenet poster
 
Posts: 587
Default How to access my camera in a batch file?

On 23/04/2018 12:02, VanguardLH wrote:
Fokke Nauta wrote:

nospam wrote:

if those apps can copy without an additional drivers, then so can his
batch file.

tl;dr - he needs to fix his batch file, or better yet, not use a batch
file at all since the apps do a much better job of copying and managing
photos.


You haven't got a clue as to why I need to use a batch file. And I'm not
going to be bothered to explain it to you. As from now on nospam will
get stuck in my spam filter.


You're starting to understand nospam. Nospam knows everything about
everything and anything other than what he knows is not relevant or not
possible.


One is never too old to learn to understand :-)

As for requiring a driver, that depends on the hardware vendor. A
driver is merely the interpretive interface to communicate to the
device: OS or apps communicate with the driver and driver communicates
directly to the hardware. A driver is not required if the hardware
vendor intends that you ONLY use their software to interface with the
hardware. They can build a driver with the logic to interface with
their hardware or they can put that logic into their software which
becomes the only means to interface with their hardware. I've seen this
with some scanners: no driver so the OS and apps cannot access the
device and you must use the vendor's software which knows the protocol
to directly communicate with their device.

Oh yes, if a device needs a driver then a vendor of discontinued
hardware will always and forever supply a driver for that hardware.
This proves that nospam never keeps any hardware beyond its support
period by its vendor. Drivers run at kernel level (ring 0). Oh yes, we
certainly are going to use drivers from an unknown and untrusted source.
Uh huh. nospam assumes that someone somewhere will save the appropriate
driver for your specific hardware and without alteration and will make
it discoverable via Internet searching.

That nospam thinks the included software with a device is the end-all
method to access a device shows he is purely an end-user. He submits to
the limitations of that software and never wants to perform any other
operations involving that hardware.


Back to the topic which is relevant regardless of nospam's claims ...

- So where (URL) did you find the PTPdriver software?


http://www.ptpdrive.com/

That's too vague
a product name to find in an online search. I'm curious about it: who
makes it, why it is needed, what it does). I'd like to see if it is a
driver, a miniport definition of the PTP/MTP miniport driver that
should've been included in Windows, or a table of devices and
provides its own direct interface to that specific hardware. Could be
your camera only supports MSC (Mass Storage device Class) and
PTPdriver converts it to a PTP device as seen by the OS. There is
also PTP software that enhances the PTP specification to support
additional features in hardware.

- I don't have the Nikon D5100. When I found its online manual, there
was no mention of PTP; however, that could be an omission because they
assumed the OS had PTP support that already worked with their camera.


I don't think so. They assume the owner will install the NXView
software, which copies the images off the camera and helps to develope them.

I didn't find "PTP" when I searched their online manual. How do you
know that camera supports PTP (here comes nospam with his claims
because he's God) and that, for example, the PTPdriver software you
bought doesn't just emulate the MSC device (your camera) as a PTP
device to the OS? I didn't find "PTP" in the manual so how do you
know that camera supports PTP (and not just, say, MSC)?


I found out on the internet somewhere.

http://imaging.nikon.com/lineup/dslr/d5100/spec.htm

That mentions DCF (the file system on the camera) but not PTP or MTP
or any file transfer protocol (over the USB hardware protocol).

https://www.dpreview.com/reviews/nikond5100

Nothing there, either, about MSC, PTP, or MTP. That the PTPdriver
makes the camera appear as a PTP device to the OS doesn't mean the
device actually itself support PTP.

PTP was designed only for file transfer of still pictures. MTP
handles music files and movies. Your camera doesn't have a movie
mode (which means it should support MTP)? The manual says it does.

While I found reference to ViewNX 2, that might be just their photo
management program. Page 63 of the manual says (after plugging in the
camera to a Windows host via USB cable):

If a message is displayed prompting you to choose a program, select
Nikon Transfer 2.

From the download page for ViewNX 2, Nikon Transfer 2 is mentioned.
Installing ViewNX 2 appears to also install Nikon Transfer 2. Again,
I don't have the D5100, so I don't have this software to see if it is
a driver, an INF miniport, or a background program or service that
provides direct interface with the hardware. From:

http://nikonimglib.com/nvnxi/onlineh.../tr017500.html

looks like it could be just another program to provide a GUI method to
users for file transfers. I can't tell if it is just a program,
included a driver, relies on PTP or MTP, or directly interfaces with
the hardware (no driver). When I search on "nikon d5100 driver", the
articles keep pointing at the ViewNX software.


Correct. There is no Nikon D5100 driver.

Remember that
installing user-mode software does not preclude the installer from
including drivers. You might have to install their software package
to get the [miniport] driver and just ignore their cutsy programs.

Finally found a user claiming the D5100 does support PTP (so I have to
wonder why PTP support was broken in your OS instance). See:

https://tekonomist.wordpress.com/201...on-d5100-dslr/

Just be aware that a PTP device does *not* create a drive letter
assignment to the device by the OS. What you saw was a UNC path to
the discovered device. Something else would need to assign the drive
letter, like a [miniport] driver, a service, or background process as
a startup program, or software you use to access the device (if it
even needs to bother with a drive letter).


Well, if I connect the camera, it shows up in "This pc" as the camera.
The PTPDriver mounts the camera to a drive letter - or however you'd
call it.


PTP is just a communications protocol, not an OS-dependent drive
manager. If MSC were still supported, plugging in the camera would
make it look to Windows like a mountable file system, so a drive
letter would get assigned. The camera would look like any other MSC
device, like a USB flash drive or HDD. Going from MSC to PTP meant
losing the USB MSC class definition. As noted in the Wikipedia
article to which I previously noted:

A disadvantage of PTP on Windows as compared to USB mass storage is
that Windows does not assign drive letters to PTP devices, so image
files on them cannot be manipulated by scripts or standard Windows
programs, only by Windows Explorer or applications with specially
written PTP support.

However, see if using "net use" described at the end works on the UNC
path that Windows assigned to the PTP camera.

- Some users had to install the MTP kit to get their USB devices working
again at MTP devices.

https://docs.microsoft.com/en-us/pre...614016(v=vs.85)

- You bought more software and that solved your problem. Unlike
nospam's contention, to you it was probably money well spent. Didn't
have to troubleshoot any further. It was easier to buy a new wheel on
which to put your old tire than to get a shop to smack a bent wheel
back into balance and alignment.

Did you ever try installing the ViewNX 2 software?


No. Overkill.

Do an image
backup, uninstall PTPdriver (and check if the problem remains
accessing the camera), install and test Nikon's free software
software, and if you don't like it or it doesn't resolve you problem
then uninstall it (or use the backup image if their install fails or
is incomplete). Even if you don't use their programs, it might
provide the driver needed to interface to that camera.

I remember having a Fuji camera that was not usable (could not get at
its files) until I installed their software. I didn't use their
programs (they sucked), especially since I just wanted to use commands
or a GUI (e.g., Windows Explorer) to access the hardware object to get
files from it. I just needed the driver (or perhaps just the INF
miniport definition) to access the camera.

I found ViewNX 2 at:
http://downloadcenter.nikonimglib.co...oad/sw/20.html

- If Nikon isn't providing an actual driver but relies on a miniport
driver (INF file), maybe it is missing. Installing their software
might add it. Could be they reply on the "Windows Portable Devices
Media Transfer Protocol" file (Wpdmtp.inf) under C:\Windows\Inf but it
is missing. When I looked in my copy on Windows 7, looks to be mostly
for defining the MTP USB class devices but there are some PTP entries.

https://docs.microsoft.com/en-us/win...on---inf--file

https://windowsreport.com/media-tran...l-not-working/
(Mentions how to update the driver, even if using the same one
again, or to reinstall the wpdmtp.inf MTP USB class definition
file.)

- You gave "This PC\D5100\Removable storage\DCIM\100D5100" as the UNC
path to the camera. That means the device was discoverable by the OS.


Correct.

PTP doesn't assign a drive letter so you got a UNC path. However, you
don't want to use or cannot use UNC pathing to identify the target in
your batch file(s). Did you try using the net.exe program included in
Windows to assign a drive letter to the UNC path in your batch files,
as in:

net use t: "\\This PC\D5100\Removable storage\DCIM\100D5100"


It says: "System error 53 has occurred. The network path was not found."
This would have been too easy :-). If it worked I wouldn't have had to
purchase this package. Perhaps it will work this way with a little change?

where, in this case, t is the drive letter to associate to the UNC
path. Obviously you change t to whatever drive letter you want that
won't conflict with existing assignments or those that will appear
later when you plug in other devices. At the end of the batch file,
and if the camera doesn't need a drive letter assignment thereafter,
use:

net use t: /delete

You can run "net use /?" for more help.

(Despite not supporting his claim with how to facilitate accessing a
UNC path in a batch file, I'm sure now after showing how to do this
that nospam will use it as his argument that you didn't need to buy
more software.)

Some more help on using "net use":
https://www.howtogeek.com/118452/how...pt-in-windows/
(found via https://www.google.com/search?q=net%...drive%20letter)


The point that I needed to connect to this camera on a file level, is
that I make one or a few pictures every day, and then connecting by USB
cable is easier then getting the SD card out. In addition, I have more
camera's. Now I run a batch file which let all camera's connect (not at
the same time), and transfer the pictures to the same foler on my pc.

Fokke

  #29  
Old April 23rd 18, 12:51 PM posted to alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default How to access my camera in a batch file?

In article , Fokke Nauta
wrote:

- I don't have the Nikon D5100. When I found its online manual, there
was no mention of PTP; however, that could be an omission because they
assumed the OS had PTP support that already worked with their camera.


I don't think so.


then you'd be wrong.

both mac and windows support ptp so there is no need to specifically
mention it. plug the camera in and it 'just works', and has for years.

They assume the owner will install the NXView
software, which copies the images off the camera and helps to develope them.


wrong on that too.

nxview is not required to copy photos or to process them. numerous
other apps can be used instead of (or in addition to) nxview.

nikon would obviously prefer it if people used nxview than competing
products, but that choice is entirely up to the user.



The point that I needed to connect to this camera on a file level, is
that I make one or a few pictures every day, and then connecting by USB
cable is easier then getting the SD card out. In addition, I have more
camera's. Now I run a batch file which let all camera's connect (not at
the same time), and transfer the pictures to the same foler on my pc.


there's no need for a batch file to do that.
  #30  
Old April 23rd 18, 03:38 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default How to access my camera in a batch file?

nospam wrote:
In article , Frank Slootweg
wrote:

In order to be able to do *that*, the camera should be presented as a
Windows drive (letter) or a Network Share.

the batch file can be modified to deal with unc.


Exactly *which* part of "The camera was not presented as either of
those" didn't you understand?


what part of it doesn't need to be presented as a drive letter or
network share is not clear?

cameras use ptp, which windows supports (and macos for that matter), no
additional drivers required.

numerous photo apps can copy photos directly without any additional
drivers, which means a batch file can also copy them.

he might need to modify his batch file, but that just means he didn't
write it properly to handle all situations. consider it a bug fix.


Then - instead of falsifying context, dodging and diverting -, give a
*working* example of *how* to use a UNC path in a COPY command which
copies a file from the DCIM folder of Fokke's camera to
\Users\Fokke\Pictures.

I.e.:

copy ...\DSC_1234.JPG \Users\Fokke\Pictures

Where you fill in the '...' part.

[Not holding our breath.]
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 02:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.