david7777
05-08-2003, 11:50 AM
Is it possible to do the following:
I have a domain "www.domain2.net"
I have a seperate domain with files on it. (www.domain1.com)
I know there is a folder www.domain1.com/thumbnails/.
In the thumbnails folder, the images are named 1.gif, 2.gif etc...
So i know the file name and path, but the problem is that i dont know how many images there are. So i want to use an infinite loop, and in each loop, a variable will increase by one. I will map a path to the image and check to see if it exists. (1.gif) If it does, save it to disk, and continue with next loop.(2.gif) If it does not exist, exit the loop completely.
ie:
dim i = 1
dim str as string = "http://www.domain1.com/thumbnails/"
dim newStr as String
do
newStr = str & i & ".gif"
' Map to file and check if it exists
if fileExists then
' save file to disk
else
'exit loop
end if
end do
Any help appreciated!
I have a domain "www.domain2.net"
I have a seperate domain with files on it. (www.domain1.com)
I know there is a folder www.domain1.com/thumbnails/.
In the thumbnails folder, the images are named 1.gif, 2.gif etc...
So i know the file name and path, but the problem is that i dont know how many images there are. So i want to use an infinite loop, and in each loop, a variable will increase by one. I will map a path to the image and check to see if it exists. (1.gif) If it does, save it to disk, and continue with next loop.(2.gif) If it does not exist, exit the loop completely.
ie:
dim i = 1
dim str as string = "http://www.domain1.com/thumbnails/"
dim newStr as String
do
newStr = str & i & ".gif"
' Map to file and check if it exists
if fileExists then
' save file to disk
else
'exit loop
end if
end do
Any help appreciated!