#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    346
    Rep Power
    0

    find root web directory


    my program ftp's to a customers web site. it needs to find the web folder to upload a load of files - the problem is that the web folder could be any number of names - and there are usually a few folders visible when ftping in - so how would m program know which folder is the web folder? it could be /web, /public_html etc etc

    thanks
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,646
    Rep Power
    4248
    Ask your hosting company. They're the ones that can best answer this.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    346
    Rep Power
    0
    my program ftp's to a customers web site
    ..
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,646
    Rep Power
    4248
    Ask your customer then. You can never determine which folder it is automatically. It gets even trickier if you have multiple websites hosted under one acount. In my case, the folder may be named htdocs or www.foobarco.com or whatever domain name I need it to be uploaded to.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    174
    Rep Power
    11

    make it two steps


    This will be an area where you can't really programmically have all the options ready for your users. So best to provide a form online where you ask your user/customer what this directory is, then generate your setup files on this information. This makes it a two step approach, relying on your customer's understanding yet doesn't require you to do a manual setup.

    cheers

IMN logo majestic logo threadwatch logo seochat tools logo