Listing folders on a server

Hello,
I have been scrounging the forums for any ideas on how I can list the folders on my server from my clients location.
I am making a user manual that's just a set of videos embedded into HTML files and I thought if I put each HTML file into sub folders then I could build a tree structure from the clients location and they could choose which topic they wish to view.
The reason for this is that the program is huge and making a user manual will take me months so I thought I'd make it gradually and also have the freedom to replace videos when the system changes.
The program that reads the folders and launches the HTML browser works fine on my machine but alas I didn't realise that you can't just use file.list() and get the folders from my server.
Is there some other way it can be done simply, I guess I could have an XML page of the folder structure in a fixed location that I could update when I put a new folder on the server but my boss would be extra pleased if I could do away with it and just whack the folders up when they are made.
Thanks
kind regards, Aaron :)

Simple html directory scraper using TagSoup:import  java.io.*;
import  java.net.*;
import  java.util.*;
// TagSoup HTML SAX parser, see http://mercury.ccil.org/~cowan/XML/tagsoup/
import  org.ccil.cowan.tagsoup.Parser;
import  org.xml.sax.Attributes;
import  org.xml.sax.InputSource;
import  org.xml.sax.SAXException;
import  org.xml.sax.helpers.DefaultHandler;
* Gets an http url, scans for links that may under this one.
public class HttpDir {
   * Maybe lists the child nodes in a folder, if it's the sort of html page
   * most web servers throw up for a directory listing.
   * @param url The URL of the page to scrape folder data from.
   * @return A list of possible sublinks.
   * @throws SAXException if something happens in the parsing.
   * @throws IOException if something happens in the streaming.
   * @throws IllegalArgumentException if url doesn't start with "http://"
  public static List listDir (final String url) throws SAXException, IOException {
    final List sublinks = new ArrayList();
    if (!url.startsWith("http://")) {
      throw new IllegalArgumentException("No an http URL '" + url + "'");
    final String dirUrl = url.endsWith("/") ? url : url + "/";
    final String serverbase = dirUrl.substring(0, dirUrl.indexOf("/", 7));
    final String dirPath = dirUrl.substring(serverbase.length());
    InputStream in = null;
    try {
      in = new URL(dirUrl).openStream();
      final Parser parser = new Parser();
      parser.setContentHandler(new DefaultHandler() {
        public void startElement (String namespaceURI, String localName, String qName, Attributes attrs) {
          if ("a".equals(localName)) {
            final String href = attrs.getValue("href");
            if (href != null) {
              if (href.startsWith("/")) {
                if (href.startsWith(dirPath)) {
                  // relative url, begining in '/', stemming from directory base
                  sublinks.add(href.substring(dirPath.length()));
              } else if (href.startsWith(dirUrl) && (href.length() > dirUrl.length())) {
                // full url, starting from directory base, but not the directory base
                sublinks.add(href.substring(dirUrl.length()));
              } else if (href.indexOf(':') == -1) {
                // not begining in '/' and no colon => no protocol, therefore relative url,
                // so is automatically under directory base
                sublinks.add(href);
      parser.parse(new InputSource(in));
    } finally {
      if (in != null) { in.close(); }
    return sublinks;
}

Similar Messages

  • Certain folders on a server are always completely expanded (in List view). Why?

    Hello, All.
    This is an issue that has bugged me for years (possibly since OS 9, although my memory isn't what it used to be and I can't confirm that).
    I currently work for a design marketing studio and have spent most of my career in this field. I often have to work off of large servers with many folders within each job folder. For some reason, every time I go to certain folders on the server every folder is expanded (in List view). I collapse them all every time with the option key and arrow, but I would love to find out how to correct this for good. Meaning I would like to go to the folder on the server and find every folder within it already collapsed every time.
    There are hundreds of folders that I open daily and when I have to go to certain ones I dread it because it takes forever to open because it has to expand every folder within. It's just a minor inconvenience and time waster, but If there is a way to fix this permanently I would love to hear it. Otherwise I will continue on with collapsing and cursing them all as I've been doing for years.
    Thanks
    P.S.
    I had trouble finding the correct category to post this in. I would appreciate any help in moving this post to the proper category. This issue has been present in every version of every OS I've ever run on, not specifically 10.7. I was hoping to find a General Apple Discussions community here, but could not. Most of the communities which seemed to be a reasonable choice were not available to choose. Posting this question has proven to be more frustrating than I had hoped.

    Hello, All.
    This is an issue that has bugged me for years (possibly since OS 9, although my memory isn't what it used to be and I can't confirm that).
    I currently work for a design marketing studio and have spent most of my career in this field. I often have to work off of large servers with many folders within each job folder. For some reason, every time I go to certain folders on the server every folder is expanded (in List view). I collapse them all every time with the option key and arrow, but I would love to find out how to correct this for good. Meaning I would like to go to the folder on the server and find every folder within it already collapsed every time.
    There are hundreds of folders that I open daily and when I have to go to certain ones I dread it because it takes forever to open because it has to expand every folder within. It's just a minor inconvenience and time waster, but If there is a way to fix this permanently I would love to hear it. Otherwise I will continue on with collapsing and cursing them all as I've been doing for years.
    Thanks
    P.S.
    I had trouble finding the correct category to post this in. I would appreciate any help in moving this post to the proper category. This issue has been present in every version of every OS I've ever run on, not specifically 10.7. I was hoping to find a General Apple Discussions community here, but could not. Most of the communities which seemed to be a reasonable choice were not available to choose. Posting this question has proven to be more frustrating than I had hoped.

  • List folders specific user has permission

    Hi, i am from Spain, excuse my bad English
    I have a 2008 r2 file server with more than 100 folders and more than 500 subfolders
    I want to list folders and subfolders that specific user has permissions
    Is this posible?
    How?
    Thanks in advantage

    Hello,
    I have developped one script powershell for my customers. I have uploaded this script on the technet Gallery.
    The link for download it's here
    https://gallery.technet.microsoft.com/Get-a-list-with-the-share-811d1221

  • IPad not using Sent, Trash folders of IMAP server

    The iPad 1 is running iOS 5.1.1.  I have created an IMAP mail account and in Mailbox Behaviors have mapped Drafts on the iPad to Entwürfe on the server, Sent on the iPad to Gesendete Objekte on the server, and Deleted on the iPad to Papierkorb on the server.  When I send mail from this account it does not appear in Sent.  Using a Web mail client I can verify that it does not appear in Gesendete Objekte either.  I have the same problem when I delete mail from this account on the iPad:  the mail does not appear in Trash (on the iPad) or Papierkorb (on the server).
    I have setup the account on an iPhone 4S, and the same problems occur there.  On an MacBook Pro running OS X 10.7.4 I have also setup an IMAP account for the same server and have performed tha same mapping of the Mail folders to the server's.  There, everything works as expected.  When I send a mail from that account on the Mac, it appears in Sent, Gesendete Objekte and in Sent on the iPad and iPhone.  Similarly, when a mail is deleted from the account on the Mac, it appears in Trash, Papierkorb, and Trash on the two iOS devices.
    Does anybody have a solution to this problem?  It's almost as if there's option missing in iOS 5 to "save on server"; they're there in Mail on the Mac.
    Regards,
    Richard

    OK, I have found the problem.  One of the mail accounts, for vtx.ch (formerly tiscali.ch), was configured to get mail from vtx's POP server, but to send it from my domain's SMTP server.  For some reason, mail that was sent from my domain's mail server was being put in the local Sent folder of the vtx account.  The same was true of Trash, Junk, and Drafts.  I was able to fix this by deleting the vtx POP account and creating an IMAP account instead.  I could map the folders of the vtx IMAP server to the right ones on the iPad and specify my domain's SMTP server for outgoing mail.  Everything now works as expected.  In particular, if I forward a mail from the vtx Inbox, it is sent using my domain's SMTP server, but appears in the Sent folder of the vtx account, while doing the same thing with a mail in the Inbox of the account corresponding to my domain's email server causes the mail to appear in its Sent folder.
    I suspect this is a bug due to an oversight on Apple's part, as usually every email service has its own servers.  The vtx SMTP server doesn't allow me to send mail from outside the vtx domain, i.e., I can only send mail from its Webmail interface using vtx's SMTP server.  That's why I have to use another SMTP server to send from outside vtx.
    Regards,
    Richard

  • "could not save list changes to the server" while creating a new form in SharePoint Designer - custom content type

    i am getting "could not save list changes to the server" while creating a new form in SharePoint Designer.
    Actually the list was created with a custom content type. When i try to create a new form from the custom content type, it fails.
    However, when i try to create a form using item content type, it creates a form successfully.
    Could you please let me know hte workaroud for this.
    Tnx

    Hello,
    This link may be help you to create custom form using content types:
    http://blog.splibrarian.com/2011/03/21/using-content-types-to-modify-the-newform-aspx-and-editform-aspx-pages/
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help <br/>(On vacation from 16th Oct to 28th Oct 2014)

  • A trouble free way of giving Administrators access to redirected folders on Windows Server 2008 R2 Standard?

    A few months ago I set up some redirected folders on a clients Windows Small Busines Server 2008. I recall that setting up the redirected folders was straightforward, but when I edited the permissions to allow administrative access to these server located
    folders, all hell broke lose. The permissions change seemed to trash the folders. I think I managed to 'bodge' it for a couple of users and got it working, but it was such a headache I didn't bother doing it for the other users.
    Now, I sit in front of a brand-spanking-new Windows Server 2008 R2 Standard box which is going to be installed with a new client within 48 hours. I would like to set up redirected folders and would like to grant admin rights on these folders so I can view
    their contents directly from the server.
    It seems to me that there is no offical Microsoft documentation which relates specifically to doing this on Windows Server 2008. Given the amount of problems this has caused for many admins, I am astounded.
    Somewhere there are articles which describe how to do it on 2003, but this procedure does not work well in 2008.
    There is an SBS article that admits permissions can be trashed, but this is no help on Standard edition:
    http://blogs.technet.com/b/sbs/archive/2010/10/08/folder-redirection-in-small-business-server-2008.aspx
    I have just posted a note on this rather long article:
    http://social.technet.microsoft.com/Forums/en-GB/smallbusinessserver/thread/70fa7f0e-7f2c-4f00-8401-42d262d80cd6
    So, my question, hopefully to Microsoft employee, please can you document
    exactly how to grant admin rights to users redirected folders on Windows Server 2008 R2 Standard, and please could you do it today :-)
    In the absence of this help, then I'm afraid this is yet another great but badly implemented feature that we will not be using.
    Stuart

    Typical Micro$haft answer!
    Quote "Hope this helps!"
    NO IT DOESN'T!
    Did you bother to read the original question?
    Quote "So, my question, hopefully to Microsoft employee, please can you document exactly how
    to grant admin rights to users redirected folders on Windows Server 2008 R2 Standard"
    So, Micro$haft, Why did you give instructions to Server 2003?
    ... When the requester SPECIFICALLY stated: "Somewhere
    there are articles which describe how to do it on 2003, but this procedure does not work well in 2008"

  • Can we create a file in temporary folders of the server?

    Hi all,
    can we create a file in the temporary folders of the server by getting the server temp path using System.getProperty("java.io.tmpdir") ?
    I dont have access to the server. I deployed my application in the server which should create a word file for me.
    I am trying to create a word file in the temporary folder of the server. Can my code create a file in the server to which I dont have access?
    Please come up with your help.
    Thanks,
    Phanindra.

    Hi:
    copy file to target folder
      CALL FUNCTION 'SCMS_FILE_COPY'                            "#EC *
        EXPORTING
          src_filename = t_source_file
          dst_filename = t_target_file
        EXCEPTIONS
          read_failed  = 1
          write_failed = 2
          OTHERS       = 3.
      IF sy-subrc <> 0.
        MESSAGE i208(00) WITH text-009.
        stop.
      ELSE.
    delete source file
        CALL FUNCTION 'SCMS_FILE_DELETE'                        "#EC *
          EXPORTING
            filename      = t_source_file
          EXCEPTIONS
            not_found     = 1
            name_too_long = 2
            OTHERS        = 3.
      ENDIF.

  • _vti_bin/lists.asmx 500 (Internal Server Error)?

    I am using this post (Display
    information from another list)script files for lookup field and get other field information.
    After using this I am getting 500
    error for List webservice. domain/dept/it/_vti_bin/lists.asmx 500 (Internal Server Error)
    I don't understand where is the problem is?. I can access service directly with url in the browser.
    spjs-utility.js file using below code call list service
    spjs_wrapSoapRequest(argObj.listBaseUrl + '/_vti_bin/lists.asmx','http://schemas.microsoft.com/share.....
    function spjs_wrapSoapRequest(webserviceUrl,requestHeader,soapBody,successFunc){
    var xmlWrap = [];
    xmlWrap.push("<?xml version='1.0' encoding='utf-8'?>");
    xmlWrap.push("<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>");
    xmlWrap.push("<soap:Body>");
    xmlWrap.push(soapBody);
    xmlWrap.push("</soap:Body>");
    xmlWrap.push("</soap:Envelope>");
    xmlWrap = xmlWrap.join('');
    $.ajax({
    async:false,
    type:"POST",
    url:webserviceUrl,
    contentType:"text/xml; charset=utf-8",
    processData:false,
    data:xmlWrap,
    dataType:"xml",
    beforeSend:function(xhr){
    if(requestHeader!==''){
    xhr.setRequestHeader('SOAPAction',requestHeader);
    success:successFunc,
    error:function (xhr, ajaxOptions, thrownError){
    //alert(xhr.status);
    //alert(thrownError);
    I did check Response header also.
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
    </faultstring>
    <detail>
    <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    </errorstring>
    <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    0x80131904</errorcode>
    </detail>
    </soap:Fault></soap:Body></soap:Envelope>
    Reset of header
    Request URL:http://spfoundation/dept/it/_vti_bin/lists.asmx
    Request Method:POST
    Status Code:500 Internal Server Error
    Request Headersview source
    Accept:application/xml, text/xml, */*; q=0.01
    Accept-Encoding:gzip,deflate
    Accept-Language:en-US,en;q=0.8
    Cache-Control:max-age=0
    Connection:keep-alive
    Content-Length:778
    Content-Type:text/xml; charset=UTF-8
    Cookie:Ribbon.WikiPageTab=1600713|-1|942|307512076; Ribbon.Library=1600713|-1|601|-531748491; Ribbon.EditingTools.CPInsert=1920653|-1|1672|-245740227; Ribbon.Table.Layout=1920653|-1|1013|-245740227; Ribbon.WebPartPage=1745865|-1|1073|1683769258; Ribbon.ListItem=1455690|-1|890|1683769258; Ribbon.ListForm.Display=1455690|-1|1214|-380038359; Ribbon.Read=1455690|-1|0|963923228; Ribbon.List=1455690|-1|452|963923228; Ribbon.EditingTools.CPEditTab=1455419|-1|391|-1168739712; WSS_FullScreenMode=false; Ribbon.ListForm.Edit=1455419|-1|1204|320596508
    Host:spfoundation
    Origin:http://spfoundation
    Referer:http://spfoundation/dept/it/Lists/ProjectTask%20Status%20Details/NewForm.aspx?Source=http%3A%2F%2Fspfoundation%2Fdept%2Fit%2FLists%2FProjectTask%2520Status%2520Details%2FAllItems%2Easpx&RootFolder=
    SOAPAction:http://schemas.microsoft.com/sharepoint/soap/GetListItems
    User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
    X-Requested-With:XMLHttpRequest
    Request Payload
    <?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>A444F1C4-60CD-45F4-B0A4-049CD8942E46</listName><query><Query xmlns=""><Where><Eq><FieldRef Name='ID' /><Value Type='Text'>undefined</Value></Eq></Where></Query></query><viewFields><ViewFields xmlns=""><FieldRef Name="Change_x0020_Requestor"/><FieldRef Name="ID"/></ViewFields></viewFields><rowLimit>100000</rowLimit><queryOptions><QueryOptions xmlns=""><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns></QueryOptions></queryOptions></GetListItems></soap:Body></soap:Envelope>
    Response Headersview source
    Cache-Control:private
    Content-Length:600
    Content-Type:text/xml; charset=ut
    ItsMeSri SP 2013 Foundation

    try these links:
    http://www.cleverworkarounds.com/2013/10/20/another-cause-of-the-server-returned-a-non-specific-error-when-trying-to-get-the-data-view-from-the-data-source/
    http://stackoverflow.com/questions/11634206/sharepoint-getlistitems-not-returning-list-items
    http://forums.asp.net/t/1844650.aspx?500+Internal+Server+Error+with+webmethod+reference+on+asmx

  • Setting up the correct list sepparator on Application Server

    Hi,
    I have created an Oracle report in Reports 10g, with DESFORMAT = DELIMITEDDATA and DELIMITER = ','.
    MIMETYPE is set to application / vnd.ms-excel.
    Unfortunately, the output of the report is not formatted in Excel file (all lines are in the same cell).
    If i remove DELIMITER=',', it will work correctly.
    This is related to List Separator definition on the Application Server (e.g. Control Panel, Regional Settings, etc....).
    So, it should work correctly if i use DELIMITER = ',' and set up "," as List Separator on Application Server.
    Is my assumption correct ?
    Thanks,
    Mihai

    You should only need the following for excel format: *...&DESFORMAT=DELIMITEDDATA&MIMETYPE=APPLICATION/VND.MS-EXCEL&...*
    Good Luck!

  • Store sharepoint 2010 list data in sql server

    Hi,
    I want to store sharepoint list data to sql server database.
    SO can anyone guide how can i attach my sharepoint 2010 with sql server 2008.
    Please help to solve the issue.
    Thanks in advance.
    Regards
    Rajni

    Hi,
    The screenshot indicates that SharePoint Designer is crashing when trying to add new External Content Type.
    Remove the SharePoint Designer and reinstall it to check the result.
    Microsoft Business Connectivity Services (BCS) enables users to read and write data from external systems—through Web services, databases, and Microsoft .NET Framework assemblies—from within Microsoft SharePoint 2010 and Microsoft Office
    2010 applications.
    There are lots of blog articles showing how to configure BCS in SharePoint 2010. You can start from:
    Understanding Business Connectivity Services
    http://blogs.msdn.com/b/sharepointdev/archive/2011/12/26/understanding-business-connectivity-services.aspx
    Using Business Connectivity Services in SharePoint 2010
    http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to move folders from one server to another serve using unix command

    Hi All,
    How to move the folders from one server to another server using unix command.
    scp -r armops@sjarmprd01:/ARM/scripts [email protected]:/ARM/scripts/
    but it is giving an error like not a regular file .. what it means .. please let me know if any one knows about it
    Thanks
    Sreedhar

    not a regular file .. what it meansProbably you have some fifo (named pipe) files...
    Said that this has nothing to do with database (you should post on some nix forum, for example http://forums.oracle.com/forums/forum.jspa?forumID=135), you may try rsync* command (man rsync).

  • How to disable the Directory listing for the whole server or a particular a

    Please let me know how to disable the Directory listing for the whole server or a particular application.
    Thank You

    I want to disable the tab focusing( tab index) for a JTextField objectsLook through the API and find methods with the word "focus" in the method name.
    Also can u tell me about how to change the tab index orders for JTextFields."How to Use the Focus Sub System":
    http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html

  • Sidebar Favorites that point to folders on our server

    We have two people using Lion now on MacBook Pros...
    Both users had several favorites that pointed to folders on our server.  The favorites do nothing.  However, if you "re-add" a folder that is located on the server then all the favorites start working again.  If you add any folder that is located on the server then all the favorites that pointed to folders on our server they all start working again.
    The next day, the problem starts all over again.  Favorites stop working, "re-add" a folder from the server and the favorites start working again.
    Any thoughts on how to permanently fix this?
    Jessica

    I have the same problem, and I've posted my experience here:
    https://discussions.apple.com/message/17198655#17198655
    A temporary fix is to relaunch the Finder (option + right click on Finder icon in Dock, select Relaunch) but applications that are running and are used to grab files using those very same Sidebar favorites might adjust to the Finder being relaunched.
    That happened to me when I was trying to grab an attachment from the server using Outlook for Mac 2011. I had to restart Outlook to recognize the Finder changes.

  • Report deployment process failed to request management pack list from SQL RS Server. The operation will be retried.

    I am encountering following event log in SC2012 Operations Manager and Reporting Tab is not loading in Operations Console.
    Report deployment process failed to request management pack list from SQL RS Server. The operation will be retried.
    Exception 'WebException': The request failed with HTTP status 401: Unauthorized.

    Hi,
    Can you acess http://reportserver/reports from a web browser on the OpsMgr server?
    Moreover,you can use a UDL file to test various connectivity scenarios, create a simple text file, rename the extension from TXT to UDL, fill out the necessary information on the connection tab then test the connection, and troubleshoot
    as necessary if it fails to connect.
    For more information, please review the link below:
    The easy way to test SQL connectivity
    http://blogs.technet.com/b/michaelgriswold/archive/2014/01/06/the-easy-way-to-test-sql-connectivity.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Can't get mail folders from IMAP server, why?

    I set up my IMAP mail server, but i only see the inbox and not the other mail folders in the in the mail server.
    why can i get my other mail folders from ther server?
    Ram

    Allan - Here's the other odd thing. Currently, I have my old mail account AND my new MM account both feeding into and out of Outlook. But since adding my MM acct. - even though I set it as my default mail acct. - the hierarchy tree of Outlook folders is still treating my old acct. as king and my new MM acct. as second class. I know, what's that mean? I have my overriding "Personal Folders" folder, with the sub-folders (in addition to customized ones I added) - all of these at the same level - 'Deleted Items'; 'Inbox' (for my old account); 'Junk E-mail'; 'RSS Feeds'; 'Sent Items' and "Search Folders". Then, below that, but at the same hierarchy level as "Personal Folders", I have my MM's root of an IMAP store folder that has as its name my email address, including the "@me.com". Under that, at the same level of importance as my 'Deleted Items', etc. for my old account is my MM account's "Inbox", "Junk E-mail", "Sent" (which, like I said, I created when I sent the first email from my newly created MM account), and "Search Folders"... that's it. If I delete an email from my MM acct., or am in the process of creating an email in my MM acct., I can only find it in the aforementioned "Deleted Items" or "Draft" folders, as my MM acct. doesn't have these. Is this perhaps one indicator of my sent mail synching problem? Or does one have nothing to do with the other? Does Outlook only provide one each of "Drafts", "Deleted Items" and "Outbox" that all accounts share?

Maybe you are looking for