PDA

For continued disscussion on this topic : Does a file exist (404?)



Peverbian
08-23-2000, 01:43 AM
Is there a way to determine if a file exists, like the exists() function in C/C++. I'm trying to make an archive with files named with the dates posted, and it would be easier to do such if I could just loop through a start date and end date and bring up all the files that are valid. Online comics use this a lot it seems, although I don't know if the links are hand-coded for each day... Would a cgi script work... pass the cgi a name, returns a boolean value... just wondering if anyone has come across this at all... I've looked and it doesn't seem to be so.

-Peverbian

big_wreck
08-23-2000, 03:13 AM
Im not sure about Javascript but I know CGI/Perl could handle that easily ..

One of the Moderators may opt to move this thread over to the CGI forum

Vincent Puglia
08-23-2000, 07:31 PM
Hi Peverbian,

Welcome aboard! May all your coding problems be solved :)
Unfortunately, as BW said, javascript cannot be used to create an exists() function; it barely has the ability to figure out if an HTML document exists, let alone a file within a directory.

Besides Perl, you might be able to use ASP/vbScript or php. So, my question is which forum do you wish to be moved to? If I get no answer, I'll move this thread to the CGI forum tomorrow.

Vinny

John Pollock
08-24-2000, 03:26 AM
Testing a code hack, if it works it will lock the thread here and move it to the CGI forum. :)

John Pollock
08-24-2000, 03:35 AM
OK, worked in the end, but redirects the mod to a 404 for some reason. :(