...

View Full Version : Check to see if files exist in a folder on a different server



holty
01-05-2004, 03:25 PM
Hi all

I want to check to see if there are any files located in a folder on another server (internal file server).

Basically, I have a list of folders (all fruit names)

If there is a file or many files in the banana folder, I want it to check to see if any exist and display - view banana documents.... else it will say - no banana documents available...

Is this possible - i've never tried to see if a file (where the filename is not known) is stored in a folder .

Hope you can help!

Thanks

raf
01-05-2004, 03:37 PM
Isnít what you describe basically what directory browsing is? If you put these directorys under the webroot and you enable directory browsing for that site, then youíll get what you ask for.

Or you could use a premade class. I'm sure there are plenty of those a www.hotscripts.com or phpclasses.org

holty
01-06-2004, 09:25 AM
Raf

Thanks for the reply, I've looked at: http://phpclasses.byting.at/browse.html/package/1314.html but I don't think it is what I'm after....

On a remote file server there are 20 folders (all different fruit names), some have files in and some don't (users will drop and remove files)

I have a php page that allows you to select one of these items of fruit. Once you have selected your fruit, stock information is displayed with a link to the folder on the remote server if there are any files in there (i.e. invoices etc). If there are no files in the folder (the folder will exist), then a simple message will be displayed to say no files exist.

Any ideas on this? can i use the fileexists command?

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum