Copying Photos

databasedonr

Registered User.
Local time
Today, 07:13
Joined
Feb 13, 2003
Messages
163
Greetings:

I have a database where I collect photos of items, and text of said items. The photos are not stored in the database as OLE objects, but are linked to a record and stored in a separate folder. This is working well.

My challenge is: every so often, a set of my records are displayed on a website. This website is powered by another database, and I feed that database by selecting portions of my text and copying it to another database. I would like, as part of my "Web Extract" process, to copy the photos from their current location to a folder on the web server.

At them moment, if I want to do this, I need to physically copy the photos from the "home folder" if you will to the web server folder. Is there any way I can do this programmatically?

Thanks in advance.
 
Code:
FileCopy ("C:\Test.jpg"), ("X:\Test.jpg")
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

Also search on the Scripting.FileSystemObject for it has a lot more power.
 
Thanks ghudson. I did search this forum, high and low -- and I apologise if I offended, but found no reference to this elsewhere .... BTW, this worked a treat!
 
Last edited:
PMFJI - I've often found the same when searching for something. I do a search using criteria that I *think* will bring up some relevant information - but zilch. After that, I post a question and get a clue from one of the experts here. The clue might just be a key word or phrase and, hey presto, searching for that brings up loads of hits.

For instance, I was searching an XP forum for <Run As>. It brought up nothing but, as soon as one of the experts told me to search for <Runas>, I had plenty to keep me occupied!
 
Thanks for that, Juan. One feels a bit of an idiot when reminders to search appear, especially after searching. After searching for copy file and receiving no satisfaction, I posted; after ghudson's note, I found many references for FileCopy!!

On a positive note, this site has assisted me beyond measure - thanks to everyone who participates!
 
I saw a comment some time ago (forgive me if it's a misquotation, but it conveys the philosophy):

Tell me and I'll forget
Show me and I might remember
Involve me and I will learn

I think that the vast majority here want the final option - I certainly do! I derive a great deal of satisfaction from identifying a problem and then solving it with minimal help. Of course, I could approach someone commercially and ask for their help - but that would cost me money (I'm a tight Yorkshireman!) and I wouldn't necessarily know how to resolve the problem if I came across it again.

Like you, I've learned so much by asking pertinent questions here but more by just watching threads which catch my interest.
 
Again, Juan, well said. I have found this site invaluable -- I've been a member over three years -- and visit almost daily, whether I have a question, or with the intention/hope of answering one. I'd like to think I've helped some people out, too, sharing some things that I have done. I am a far better database developer/administrator today than I was before using this site.
 
Knowing how to search takes a little practice to finding useful information. I usually include a hint, a link, some code, examples, etc. for when I state "Searching the forum is a great way to discover and learn the answers to your Access programming questions." for I have to use the Search function to find the information I answer with. Not like I can remember all this stuff; but I know how to find it. ;)
 

Users who are viewing this thread

Back
Top Bottom