By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Manipulating external images

P: n/a

We have a staff file in which each record has a text field which has the
name & path of the staff's picture (stored externally). Over years we have
archived several staff but pictures being external entities are still in the
pictures folder. Is there a way to programmatically do the following;

1. Find the pictures that do not have an associated staff record in the
staff file (i.e. pictures that or not in any of the staff's picture field)?

2. Move these pictures to an archive folder?


Jun 8 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Using a DOS prompt, use a dir command to list all the files and put the list
in a text file:

dir /w /b /s *.* > myfilelist.txt

This puts one file on each line, showing the full path of the file.

Import this as text into your database.

How you would compare that list of values to your list depends on how you
store your data. In a simple case, add a yes/no field to the imported list
of files, then:

dim db as dao.database
set db = currentdb
db.execute "Update MyImportedFileList Set FoundInEmployeeData = false;"
'clear everything out
db.execute "Update MyImportedFileList Set FoundInEmployeeData = True from
MyImportedFileList As fl Inner Join MyEmployeeTable As et on fl.Filepath =

When you finish, everything in your imported file list is marked True if it
was matched in the employee data, false otherwise. Make a query like this:

Select "DEL " & Filepath From MyImportedFileList Where FoundInEmployeeData =

Run that query. You get a bunch of DEL commands suitable for pasting into a
bacth file.

Jun 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.