hi, i try to upload a multiple image files. after that i will rename the files name.
the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok this is my codes, -
-
Set Upload = Server.CreateObject("Persits.Upload.1")
-
Count = Upload.Save("d:\cmsupload\cimg\")
-
-
for each File in upload.Files
-
'
-
'...sme operation here..
-
-
set rename = CreateObject("scripting.FileSystemObject")
-
set f = rename.GetFile(filepath1)
-
f.Copy "d:\www\cmsupload\cimg\" newname & "." & Ext, false
-
next
and then i try to delete the data using this -
Set Upload = Server.CreateObject("Persits.Upload.1")
-
Count = Upload.Save("d:\cmsupload\cimg\")
-
for each File in upload.Files
-
'
-
'...sme operation here..
-
-
set rename = CreateObject("scripting.FileSystemObject")
-
set f = rename.GetFile(filepath1)
-
f.Copy "d:\www\cmsupload\cimg\" newname & "." & Ext, false
-
-
Set fso = CreateObject("Scripting.FileSystemObject")
-
fso.Deletefile ("c:\windows\desktop\" & oldname)
-
next
-
but it return error, file no found.
it work perfectly if i insert the diffrent files name but something i dont really understood in here isn't the upload.Files will functioning like an array? array(0) then if next, array(1) and continue...
1 5712
Looking for the easy way to batch Rename Files and folders by the thousands? RenameMaestro is probably the easiest batch file renamer you'll find to instantly rename multiple files:
This swift and simple to use File Renamer lets you add increasing or decreasing numbers, letters and dates. You can swiftly add and remove text, include the created date in the file name, press rename and watch it rename files in a split second.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: dave |
last post by:
Hello there,
I am at my wit's end ! I have used the following script succesfully to
upload an image to my web space. But what I really want to be able to do is
to update an existing record in a table in MySQL with the path & filename to
the image.
I have successfully uploaded and performed an update query on the database,
but the problem I have is I cannot retain the primary key field in a
variable which is then used in a SQL update...
|
by: Dave Smithz |
last post by:
Hi There,
I have a PHP script that sends an email with attachment and works great when
provided the path to the file to send.
However this file needs to be on the same server as the script.
I want to develop a webpage where people can send attachments that are
stored on their local PC.
|
by: Pitcairnia |
last post by:
The basic purpose of the site is for authenticated users to post event
listings, which often include photographs. The user is faced with a page
where they can insert all of the information about the event in a typical
form with textboxes, drop down lists, etc. On this page there are also 4
file upload controls where the user can select 0 to 4 images on their file
system for inclusion in the event listing. On submit, the images (if any)...
|
by: SEMIH DEMIR |
last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim
yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa
persistin upload componentini kullanacam yanlız suanki haliyle
verdiği hata şu.Bilen arkadaşlar lütfen yardım edin
Persits.Upload.1 error '800a0020'
The system cannot find the path specified.
/classifieds/upload.asp, line 250
|
by: gsoguerrilla |
last post by:
Hi,
I have limited knowledge in php and I am having trouble with uploading
an image to a remote directory and resizing it if it's larger and
renaming it to a unique id, while at the same time I would like to
create a record in mysql database. I've tried to find some tutorials
but I've had trouble finding any good ones. Wondering if anybody has
good examples or link to a good tutorial.
Thanks in advance.
| |
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
|
by: xx75vulcan |
last post by:
Hi,
I've got a PHP Upload Form that works great, unless that is, the image
your uploading has been modified through a photo editing software.
Example: if I upload the image straight from a camera or other, it
uploads fine. However, If I want to rotate the image, or resize it
with photoshop or simmilar, making sure to save it again as a jpg, the
PHP upload won't upload the image.
|
by: Jason Carlton |
last post by:
I have a simple form that does nothing more than let the visitor
choose an image from their hard drive, and then upload it to the
server. It doesn't have any other fields than the <input
type="file"...field and, currently, a submit button. It's really
part of a larger form, but it's called in as an iframe so it's
technically a stand-alone form.
My question is, is it possible to submit the form as soon as the image
is selected, so that...
|
by: johngault |
last post by:
I've been working with this PHP page for several days now and I'm stumped. The page is supposed to allow the user to upload up to six images for their profile. When the user adds an image it (the page coding) does verify file size, if correct it places it on the server in the users folder and with the correct names and extension, creates the thumbnail and adds the correlating file name. However, it only adds the first file name to the database....
|
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...
|
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,...
| |
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |