473,772 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with deleting thumbnails

Me
Hi Folks,

I'm trying to delete 2 files using fso. The mail file name is stored in an
access db.
using the code below I can delete the main file but not the thumbnail.

The thumbnail has the same file name plus the suffix "_small" so if the main
file
is called "mypicture. jpg" the thumbnail is called "mypicture_smal l.jpg"

The main file is being deleted but no matter how I try I cannot get the
thumbnail
deleted. They are both in the same folder with the same permissions.

Can anyone shed any light on why this doesn't work?
Dan

Dim Photo, PhotoSmall
Photo= Rs_photo.Fields .Item("Photo_na me").Value
PhotoSmall = Left(Photo, Len(Photo)-4)
PhotoSmall = PhotoSmall & "_small" & Right(Photo,4)

Set File = CreateObject("S cripting.FileSy stemObject")
ImagePath = Server.MapPath( "..\images\M_ph otos")
ImagePath2 = Server.MapPath( "..\images\M_ph otos")
ImagePath = ImagePath & "\" & Photo
ImagePath2 = ImagePath & "\" & PhotoSmall

' check if file exists and if true delete the file
If fileExists(Imag ePath) Then
File.DeleteFile (ImagePath)
End if
If fileExists(Imag ePath2) Then
File.DeleteFile (ImagePath2)
End if
Jul 19 '05 #1
0 1198

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

Similar topics

4
1797
by: sepgy | last post by:
Can anyone help me to use a python to create an HTML photo gallery generator. When it's finished, it will be able find all the picture files (i.e. .jpg, .gif. .png files) in any given folder on the computer, automatically create smaller thumbnails for each image, and then generate a complete HTML file that displays a clickable image gallery. When viewed in a web browser, the HTML file will display the thumbnails in a neatly formatted...
2
2391
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of thumbnails, and works quite well execpt that on dial up it is unbearably slow. The Thumbnails themselves are only 10kb but the total of them is a lot larger. and it appears to need to load them all before it will display any.
5
3672
by: Ken | last post by:
I am in the process of designing my first web-site, and am having a problem with my picture gallery. My thumbnails are all different sizes, I would like them to be one size. The manual does not address this situation. Where did I go wrong?
8
3075
by: Tracker3000 | last post by:
(please stop deleting :), or tell me why you are, but this is where I want the thread) How do I make an image gallery where there are about 20 thumbnails and when you click on one, it blows it up to normal size inside the same window, and when you click on another it replaces the blown up last image with the new one you clicked. Thanks
1
1512
by: Tom | last post by:
I have just got my web site to the point where I am about to upload it, but I have come across a problem which I do not know what to look for on the web. I will try to describe the problem the best I can. I have a page with pictures in a table of 3 X 10 all pictures are thumbnails 100 X 90 all is just fine, but I have a link to pages from the thumbnails but when I return to the thumbnails I start back at the top of the thumbnails page. I...
2
3566
by: ranger7419 | last post by:
I'm trying to figure out why this script will work in IE 6 but not Firefox, and so I need someone here with a far better grasp on javascript to explain this. Basically, I have a page with several thumbnails. Above these thumbnails I placed a large picture with text next to it to describe what the picture is about. So, when you click a thumb, the large pic AND text change dynamically to reflect the thumbnail -- see...
4
5837
by: =?Utf-8?B?Q2FybGFKYWRl?= | last post by:
Can anyone help me? I need to use picture it 2000 every day and use to use it on Windows XP and had NO problems at all. If I would open up windows explorer i could be in my folder that has all of my picture it files in there, .mix files and even though they were not jpegs etc.. windows explorer would show the thumbnail of all of these projects saved so i could quickly look for something and double click to open. Since installing...
5
1993
by: JJ | last post by:
I have a gallery-like application. (The gallery will be actually presented in Flash, but the management (cms) of the images will be in asp.net. ) My question is, is it ok to create Thumbnail images on the fly by resizing the original sending it to the output stream (i.e. Response.ContentType = "image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually save the thumbnails to disk. Would this method result in a much slower...
1
2009
by: onyris | last post by:
Hi guys , I have got lost a bit with this flash i am doing at moment , i will try to explain the best i can and i'll post the code as well so u can see what i've done . I am using Action script 2, i have an XML with photos , at the moment are 7 photos in there. The code i have at the moment just simply reads from the xml all the photos adn display them in a movie clip . This is the code so far : step_sel_img.onRelease=function(){...
1
2692
by: onyris | last post by:
Hi guys , I have a problem trying to unload some images from a movie clip , not sure what i'm doing wrong , if anyone can help me please.. What i have is a movie clip called " thumbnails" on the stage which loads some images from an array . the movieclip "thumbnails" , holds at the begining the first 4 images , then i have a button called "next_btn" which loads the next 4 images .basically when the next_btn is click it is loading the next...
0
9619
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7460
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.