Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading files from USB

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
0
0
GB
I have had a search around but have not been able to find anything about loading files from USB.
I want to load pictures from my camera.

I can access them via "C:\USERS\KEITH\APPDATA\LOCAL\MICROSOFT\WINDOWS\TEMPORARY INTERNETFILES\CONTENT.IE5" but I was wondering if there ws a more elegant solution.
Advice appreciated.

Keith
 
If you find your cameras pictures in IE temporary internet files, are you sure, you're loading them from the camera? Looks like your camera has an upload to instagram or flickr or anything like that and that's just loading the ppics from there into your internet cache.

If your camera connects to USB, it should get a drive letter, as simple as that.

Look into Windows Explorer.

Look into the manual of your camera.

Bye, Olaf.
 
Hi Olaf
It used to be assigned a drive letter back when I had my faithful XP machine but since moving to WIN8 such simple things have fallen by the wayside. The computer detects the camera and it is placed in 'Portable Devices' with just the camera name.

Keith
 
OK, and can you access it by double clicking on that device name, or not?
What does the camera manual say about using it with Win8? Nothing?

Bye, Olaf.
 
Thanks Olaf,
Yes, I can access it in Windows the same as any other device and I also have a second camera which does exactly the same. The best suggestion the WIN8 community can come up with is 'I need to download an APP',

I would not be at all surprised if MS have changed this functionality, they have removed quite a few features and replaced them with idiot proof solutions - this idiot wants the old ones back!

Keith
 
Keith,

I agree with you about no longer being able to see a drive letter. I see the same thing when I connect my camera, and also my Nexus tablet.

You could try enumerating the drives in your system, using either the VFP DRIVETYPE() function, or the GetDriveType() API function - just to see if there is in fact a drive letter which you can't see in Windows Explorer (I can give you some code to do that if you need it).

Also, you say you can access the files via "C:\USERS\KEITH\APPDATA\ ... ". That surprises me, but I'll take your word for it. In that cases, you don't want to rely on "C:\USERS\KEITH\APPDATA" always being in the same place on different computers (and for different users, of course). So, it's better to use the Windows API SHGetSpecialFolderLocation() to determine the folder's location.

I've got an example of how do that here: Finding the paths to Windows' special folders.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks Mike
I have solved the mystery of why the files were downloaded to C:\USERS\KEITH\APPDATA\ ...
While experimenting yesterday, I set up a 'getfile' command in a form, navigated to the camera and then printed the fullpath. I don't know what happened to get that path as I have not been able to replicate it.

The whole thing is a bit of an experiment.
I upload photos nearly every day and would like to handle the whole process automatically - ie. just plug the camera in and let it get on with it.
I have set up the process to work from a directory on the computer but I have not been able to access the camera directly.

Keith
 
Keith

An alternative approach to accessing the photos on your camera would be to set (Windows) Autoplay to automatically import the photos to a predetermined folder on a local drive.

You can also decide if you want Windows to delete the photos after the transfer to your pc.

Thus you can achieve all this by simply plugging in the camera and let Windows do the work - transfer complete, unplug the camera.

FAQ184-2483​
Chris [pc2]
PDFcommander.co.uk
motrac.co.uk
 
Keith,

Does the camera come with any software? Maybe it already has a program that automatically transfers the photos when you plug it in.

Chris,

Regarding your Autoplay suggestion, if Keith was to write his own program to run on Autoplay, wouldn't he still need a way of determining the drive letter?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike

Autoplay should detect the camera as it's connected and then run whatever option has been set up, so no further action by Keith would be needed.

His VFP app would then point to the Windows folder for processing of the photos.

I have a VFP app running on Windows 7 which works this way - all the photos are deleted from the camera following transfer.

I am unable to test on Windows 8 as my aged camera is not recognised by either Win 7 or Win 8, but users of the app have been running it this way since the early days of Win 7.

FAQ184-2483​
Chris [pc2]
PDFcommander.co.uk
motrac.co.uk
 
The software which came with the camera is pretty darned naff to say the least.
Mike Lewis said:
Regarding your Autoplay suggestion, if Keith was to write his own program to run on Autoplay, wouldn't he still need a way of determining the drive letter?
Spot on the money there Mike.
When I connect the camera, I want a VFP .exe to run with various options.
Writing the .exe is the easy bit whereas getting this new fangled WIN8 to do anything that doesn't involve them pesky apps is more of a problem.

First problem is getting autoplay to run the .exe, the only options available are:-
[ul]
[li]Open device to view files[/li]
[li]Take no action[/li]
[li]Ask me every time[/li]
[/ul]

The other problem is the subject of this thread which despite the assistance given here is still a bit of a mystery to me.

Keith
 
Keith, if you look here, you'll see some code for enumerating the drives on your system. As you'll see, it displays each valid drive letter, plus an indication of the drive type (hard drive, removable, CD-ROM, etc). You could try running it with your camera attached, just to see if the camera does indeed have a drive letter (albeit one that is not visible in Explorer).

But I admit it's a bit of a long shot.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Keith, regarding the choices you saw with Autoplay. I'm finding a different set of choices, albeit from the Properties dialogue rather than Control Panel.

Try this:

1. Plug the camera into the USB.

2. Right-click on the camera icon, and select Properties, then Events.

3. Set "Select an event" to "Camera connected".

4. Can you see an option "Save all pictures to this folder"?

If so, that would seem to solve the problem. But I don't know if this is built into Windows or if it's specific to my camera (which is a Canon Powershot).

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
That was fun but not very fruitful.
The camera does not have a drive letter.

Annoyingly, this works on XP and Vista and according to Chris, WIN7 too.

What a bag of washing WIN8 is turning out to be. I can't see how I would be able to launch a vfp.exe when the camera was detected.
This was only a simple experiment as I load pictures and videos daily and need to process the pictures and videos separately. Some sets of pictures need to be uploaded to the internet. I can already upload, catalogue and resize them automatically, I just can't get them off the camera - how bizarre is that.

I don't really need the .exe to run on connection but I do need to be able to download them.



Keith
 
I don't really need the .exe to run on connection but I do need to be able to download them.

But point 4 in my previous post would appear to do just that.

What a bag of washing WIN8 is turning out to be.

Actually, I thought you had abandoned in some time ago, judging from your comments in the Windows 8 forum.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Assuming Win 8 follows Win 7 behaviour, there should be a registry subkey created when the options are set up:-

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PhotoAcquisition\Camera and Portable Device

To reset and allow selection of the various options when the camera is connected, double click on the "AcquisitionFlags" and enter decimal 82 as the value.

The reason for posting this is that once Autoplay has been setup, the transfer will take place in a dialog bottom right of the screen with no apparent way of stopping it.

Quick and dirty 'tweak' is to reset it through the registry.

FAQ184-2483​
Chris [pc2]
PDFcommander.co.uk
motrac.co.uk
 
Hi Mike
The options are different for me so I am thinking that your camera software is involved somewhere.

It is true that WIN8 is driving me a bit crackers but I came from XP and as that is going to have support withdrawn very soon, I don't think that is an option to return to, do you? I would have to purchase WIN7, install it and waste another age, setting all the intricate bits and pieces up just to get me back to square one.
I thought it was just me growing old grumpily but it appears that I am not alone on condemning WIN8 as a pile of doo doo. It is fine for 'Them what don't do nowt' but not good as a production environment. I keep hearing about how wonderful 8.1 will be - I have my doubts that it will be that much better than the thing we have now.

As for the camera - I am continuing to use the Vista machine next to mine for auto uploading photos and it is working a treat. I originally thought that an OS could not possibly be worse than Vista but I was proved wrong.

Keith
 
Someone portrayd the evolution of windows with comparative architecture.

Very apt:
tumblr_mrkldhtbch1s5rsdao1_1280.jpg


Bye, Olaf.
 
Keith

As Win 8 will present similar problems to yours for users of apps that require downloaded photos from cameras, decided to borrow a camera and attempt to resolve the issue.

If not already installed, you need to download the Photo Gallery included in Windows Essentails 2012, from here.

Then work your way through this article.

The process is not fully automatic but will put you back on familiar ground.

It gives you the option of selecting target folders, file naming and will delete photos after download - have yet to locate the relevant registry entries but will advise their location in due course.



FAQ184-2483​
Chris [pc2]
PDFcommander.co.uk
motrac.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top