PC Review


Reply
Thread Tools Rate Thread

Copy selected files

 
 
George
Guest
Posts: n/a
 
      31st Jul 2008
Dear friends, need your valuable help,


Case1:
within an access database I store the filelocation, e.g.
C:\folder1\photo1.jpg, C:\Anotherfolder\subfolder1\movie.mpg... etc

Using a query I select some of those records (containing the primary key of
each file, its location, etc.
I need to run a code in order to copy those selected records/files from the
query and copy them into C:\SelectedFiles, after deleting every single file
located there.

Case2:
Using the same structure of the above database I have all files stored in
C:\folder2 and I need, as above to copy some of those files into another
folder (using the same procedure as described above).

How can I accomplish those tasks?

Thanking you so much in advance,

GeorgeCY
 
Reply With Quote
 
 
 
 
banem2@gmail.com
Guest
Posts: n/a
 
      31st Jul 2008
On Jul 31, 7:15*am, George <Geo...@discussions.microsoft.com> wrote:
> Dear friends, need your valuable help,
>
> Case1:
> within an access database I store the filelocation, e.g.
> C:\folder1\photo1.jpg, C:\Anotherfolder\subfolder1\movie.mpg... etc
>
> Using a query I select some of those records (containing the primary key of
> each file, its location, etc.
> I need to run a code in order to copy those selected records/files from the
> query and copy them into C:\SelectedFiles, after deleting every single file
> located there.
>
> Case2:
> Using the same structure of the above database I have all files stored in
> C:\folder2 and I need, as above to copy some of those files into another
> folder (using the same procedure as described above).
>
> How can I accomplish those tasks?
>
> Thanking you so much in advance,
>
> GeorgeCY


You didn't mention do you need code for above or just idea?

Idea, case 1:
Code VBA to open recordset based on your query and loop through
records. Use command FileCopy(source, destination) to copy images. Use
command Kill(PathName) to delete files.

Case 2:
See case 1 without using Kill command.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
Reply With Quote
 
George
Guest
Posts: n/a
 
      31st Jul 2008
Dear Branislav Mihaljev, Thank foir the quick response,

I would appreciate very much if you provide me the code to accomplish those
tasks.

Thank you again

Ο χρήστης "(E-Mail Removed)" *γγραψε:

> On Jul 31, 7:15 am, George <Geo...@discussions.microsoft.com> wrote:
> > Dear friends, need your valuable help,
> >
> > Case1:
> > within an access database I store the filelocation, e.g.
> > C:\folder1\photo1.jpg, C:\Anotherfolder\subfolder1\movie.mpg... etc
> >
> > Using a query I select some of those records (containing the primary key of
> > each file, its location, etc.
> > I need to run a code in order to copy those selected records/files from the
> > query and copy them into C:\SelectedFiles, after deleting every single file
> > located there.
> >
> > Case2:
> > Using the same structure of the above database I have all files stored in
> > C:\folder2 and I need, as above to copy some of those files into another
> > folder (using the same procedure as described above).
> >
> > How can I accomplish those tasks?
> >
> > Thanking you so much in advance,
> >
> > GeorgeCY

>
> You didn't mention do you need code for above or just idea?
>
> Idea, case 1:
> Code VBA to open recordset based on your query and loop through
> records. Use command FileCopy(source, destination) to copy images. Use
> command Kill(PathName) to delete files.
>
> Case 2:
> See case 1 without using Kill command.
>
> Regards,
> Branislav Mihaljev
> Microsoft Access MVP
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to browse files then copy certain data from the selected fil Arran Microsoft Excel Programming 7 2nd Aug 2009 08:59 PM
Copy user selected files to new folder. Keithlo Microsoft Excel Programming 5 11th Mar 2009 02:41 PM
Retrieve selected text from any window / Get selected files fromexplorer dh Microsoft VB .NET 18 31st Jan 2009 11:17 AM
openfiledialog in multiselect mode can make an unintended copy of the selected files Bernie Yaeger Microsoft VB .NET 0 8th Mar 2005 11:17 PM
Inadvertent copy of (Ctrl) selected files - Windows Explorer ? XP User Windows XP General 1 23rd Aug 2003 05:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:49 PM.