473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Manipulating external images

Hi

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?

Thanks

Regards
Jun 8 '06 #1
1 1462
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 =
ep.EmployeePhotoFilePath;"

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 =
False

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

BACKUP, BACKUP, BACKUP!!!!
Jun 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kenneth McDonald | last post by:
Warning: this post may display my utter ignorance of image file format facts. As part of a photo album program I'm working on, I'd like to be able to work with the metadata in JPEG files, which...
14
by: Richard Speiss | last post by:
I am trying to display a random background image for a webpage. I found this code to do it <% 'Defines the number of background images you have Const NUMBER_OF_IMAGES = 2 'Initiates the...
0
by: Cameron | last post by:
I can't get images from remote machines to appear on my reports. The readme for reporting services SP1 says about external images "the report server uses the unattended execution account to...
4
by: primary0 | last post by:
Hi, I have a page containing an external javascript which loads an image onto the webpage. How would it be possible to use javascript to read the filname (and the dimensions) of the loaded image...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
3
by: highab | last post by:
Hello, I want to send a parameter (string) to an external js file. I found something very similar to what I wanted with you but it doesn't answer my question, so here goes: I call my...
20
by: Mark Anderson | last post by:
Hi, I have this in an external JS library: ///////////////////////// function addMyEvent(){ var obj; if(document.attachEvent) { obj = document.getElementsByTagName('img'); for...
3
by: woete | last post by:
I'd like to obtain an image's width and height. I find interesting articles on several sites... However, all these scripts only work with images that are stored locally. Can you give any hint on...
3
by: Cyprus106 | last post by:
Does anybody have any good websites, books, whatever for working with and manipulating images? Topics I need some information on are conversions (to greyscale, from one type to another, etc.), line...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.