Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check to see if files exist in a folder on a different server

    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

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Raf

    Thanks for the reply, I've looked at: http://phpclasses.byting.at/browse.h...kage/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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •