Fetching filenames from a directory and adding to vector

Hi all,
I am seeking your help to implement a certain logic.
I have a root directory. This directory contains hundreds of folders, subfolders and files.
I have a method(getChildren(pathname)) by which I get the children names corresponding to each directory, and for this I only need to give the path of the directory to the method, which returns the children vector.
I have a method to determine whether a name in the children vector is a directory or not.
The first path ; ie; the root directory path will be "/" . After that, for each sub directory, the path will be created by appending the directory name to it. ie; /subfolder1/subfolder2..
In short, I need to iterate through the entire directories and subdirectories in the root folder, by passing the path as argument to the getChildren(pathname) method .
I add all these child names to a vector.
Can anyone kindly help me by giving suggestions, as to how can I implement this logic.
Please help.
Any help will be appreciated with dukes.
Regards,
Rony

Thanks veldhanas,please refer my code posted and the comments given after this.
Vector getFileListing() throws FileNotFoundException {
              Vector result = new Vector();
              _constructChildren(new File("/"), result);
              System.out.println("result"+result);
             return result;
       private void _constructChildren(File dir, Vector files)
          if (dir.isDirectory())
               System.out.println("dir.getAbsolutePath"+dir.getAbsolutePath());
               Vector children = constructChildren(/*how to generate path to be passed from here*/);
               Iterator i = children.iterator();
               while(i.hasNext())
                    SFTPv3DirectoryEntry child = (SFTPv3DirectoryEntry) i.next();
                    if (child.attributes.isDirectory())
                         _constructChildren(new File(dir, child.filename), files);
                    else
                         files.add(child);
       }"How to maintain the path."
The root path(first path) will be "/" . Rest all I have to generate by appending the folder names.
This point is what puzzles me.
Once more I make my point clear. There are no methods to generate the path, instead it has to be generated manually.
The only initial path what we have is "/" . Later on path has to be generated in the format /dirname1 or /dirname1/dirname11 and the likes and load the children based on these paths and add to the result vector.
If i correctly generate the path by using the directory names in the format /.../.../.. , the constructchildren method will give the children corresponding to the path and my problem is solved!
Hope I am clear enough.

Similar Messages

  • Get the filename from a directory and insert into a table

    Hi,
    I have a requirement, i need to read the file name from a Linux directory and get that file name into a variable,
    After that i need to insert that file name into a table.
    EX: let their is a file1.txt in abc directory , and i read that "file name" into v_file_name variable and i am going to insert that file name into a table.

    You should have something common in all your file name that can be used to distinguish between them.
    Ex: Suppose file names are like FILENAME_PKG1,FILENAME_PKG2,FILENAME_PKG3 then it will be easier to develop the logic inside ODI so that FILENAME_PKG1 can be processed by package1 ,FILENAME_PKG2 can be processed by package2 ,FILENAME_PKG3 can be processed by package3.
    Hope you got, what i want to say.
    Thanks.

  • I want read PDF file from SAP directory and create a spool request or print

    Hi all,
    I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body  help me in this.
    Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
    Thanks in advance,
    Sunny

    Hi Sunny,
    Check these links.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    http://www.erpgenie.com/sap/abap/pdf_creation.htm
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Getting a Filename from a Directory Structure

    Hi,
    Our client will be sending us a Fixed Length file via FTP, each month. That file will be in a specific folder, but we will not KNOW that filename, The client doesn't want to put an header record in the file with the filename information... Is there a way in PL Sql to look in a directory and read all the filenames in there?
    Thanks in advance!

    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    Our client will be sending us a Fixed Length file via FTP, each month. That file will be in a specific folder, but we will not KNOW that filename, The client doesn't want to put an header record in the file with the filename information... Is there a way in PL Sql to look in a directory and read all the filenames in there?
    >
    And what good would it do to have a header record INSIDE the file that has the filename information if you need the filename to find, open and read the file? That doesn't even make sense.
    You don't say what you plan to do with the file. Will you use an EXTERNAL TABLE to load the file data into the DB?
    For monthly processing I use the Java procedure that Rod refers you to to do the actual directory reading. Java is much more flexible for OS operations than PL/SQL as it has extensive support for OS operations. Using Java you can easily check the file date and size to verify that this is a new file ready for loading.
    After the file is loaded or processed you should have a shell script (or another Java procedure) that moves it to an archive folder if you wish to leave the directory empty and ready for the next file drop. The main problem with a design that requires an empty folder is that design is not scaleable if your requirements change and you need multiple drops and/or drops from multiple vendors.
    A better archytecture is to treat the intial DROP folder as a staging area where you can perform the proper tests to make sure the file was received properly and that it is the correct file.

  • Reading only Image Files from a Directory and ignoring the rest

    i am wanting to be able to read a directory but only obtain the Image files (ie, gif, jpeg, tiff, png etc) and ignore all other type of files.
    i have made a custom ImageFIlter class which extends FileFilter which works for adding a photo singly, as only image files are shown in the JFileChooser. however i am wanting to add a folder of photos at once.
    here is the code so far:
    File dir;
                        JFileChooser fc = new JFileChooser();
                        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                        //Handle open button action.
                        int returnVal = fc.showOpenDialog(MainAppGUI.this);
                        if (returnVal == JFileChooser.APPROVE_OPTION) {
                             dir = fc.getSelectedFile();
                             if (dir.isDirectory()) {
                                  File[] files = dir.listFiles(new ImageFilter());
                                  for (int i = 0; i < files.length; i++) {
                                       if (files.isFile()) {
                                            try {
                                                 Photo PhotoAdded = workingCollection.addManyPhotos(files[i], canvas.getChangedMaxDim());
                                                 //need to also add it to the relevant vectors, ie
                                                 //for mouse over operations, or photos added after
                                                 //save.
                                                 if(!workingCollection.isDuplicate()){
                                                      photosToCheck.add(photoAdded);
                                                      canvas.addToGrid(photoAdded);
                                                      photosAddedAfterLoad.add(photoAdded);
                                                      canvas.repaint();
                                                 else{
                                                      //do nothing as it is already in the vectors.
                                            } catch (Exception er) {
                                                 // Do nothing. Bad mp3, don't add.
                                       // recurse through directories
                                       else {
                             } else {
                                  try {
                                       throw new IOException(
                                                 "Error loading files from a directory: "
                                                           + dir.getAbsolutePath() + " is not a "
                                                           + "directory");
                                  } catch (IOException e1) {
                                       // TODO Auto-generated catch block
                                       e1.printStackTrace();
    any ideas?

    I'm confused.
    You already ARE using a FileFilter to only pick up image files. Whats the problem?
    If you need to recurse directories you need to change your code only a little.
    Write your method
    JFileChooser fc = new JFileChooser();
    fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    //Handle open button action.
    int returnVal = fc.showOpenDialog(MainAppGUI.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      dir = fc.getSelectedFile();
    if (dir.isDirectory()) {
      scanDirectory(dir);
    else{
      // not a directory
    public void scanDirectoryForPhotos(File directory){
      // taking your code
    if (dir.isDirectory()) {
      File[] files = dir.listFiles(new ImageFilter());
      for (int i = 0; i < files.length; i++) {
        if (files.isFile()) {
    // details deleted
    // recurse through directories
    else {
    scanDirectory(files[i]);
    Your exception handling is a little strange. You throw an exception only to catch it immediately to print a stack trace? Not exactly the most common handling I've seen. You should probably just throw the exception and let the next level down handle it.
    Cheers,
    evnafets

  • How to get filename from selected directory

    Helle experts,
    I've a string variable from a directory with following content:
    G:\SAP_R3_MRSS\SAP_MRS\FAVORIT.PDF
    now I just want to select the filename, in this case FAVORIT.TXT
    How can I do this ? The directory/filename may vary.
    Some ideas ?
    Thanks
    Gerd

    Eric's split is probably the best way, but if you need a way to break the path into drive, path, and file, you could use a standard, well-used regular expression:
    PROGRAM zzfile.
    DATA:
       g_regex     TYPE string VALUE '\b((?#drive)[a-z]):\\((?#folder)[^/:*?"<>|\r\n]*\\)?((?#file)[^\\/:*?"<>|\r\n]*)',
       g_path_file TYPE string VALUE 'G:\SAP_R3_MRSS\SAP_MRS\FAVORIT.PDF',
       g_drive     TYPE string,
       g_path      TYPE string,
       g_file      TYPE string.
    FIND FIRST OCCURRENCE OF REGEX g_regex IN g_path_file SUBMATCHES g_drive g_path g_file IGNORING CASE.
    IF sy-subrc = 0.
    *  WRITE g_drive.
    *  WRITE g_path.
      WRITE g_file.
    ENDIF.

  • Retrieve all user id's from LDAP directory and populate in Oracle table.

    Guys,
    We've implemented LDAP authentication functionality in our application using Oracle's dbms_ldap package objects.
    Now,Is there any way that I can retrieve all user ids from the LDAP directory and store in an Oracle table?
    The distinguished name of authorized user as it appears in our LDAP directory is below:
    dn=uid=ab0472,ou=people,ou=xyz,o=world.
    Now I need to fetch all users uid's from the LDAP directory and populate in an Oracle table.Can somone help me with thoughts.
    Thanks,
    Bhagat

    Have a look at attachments API, since this also does the same thing except that it puts the file in fnd_lobs instead of the custom table.
    Thanks
    Tapash

  • How do I get info from Active Directory and use it in my web-applications?

    I borrowed a nice piece of code for JNDI hits against Active Directory from this website: http://www.sbfsbo.com/mike/JndiTutorial/
    I have altered it and am trying to use it to retrieve info from our Active Directory Server.
    I altered it to point to my domain, and I want to retrieve a person's full name(CN), e-mail address and their work location.
    I've looked at lots of examples, I've tried lots of things, but I'm really missing something. I'm new to Java, new to JNDI, new to LDAP, new to AD and new to Tomcat. Any help would be so appreciated.
    Thanks,
    To show you the code, and the error message, I've changed the actual names I used for connection.
    What am I not coding right? I get an error message like this:
    javax.naming.NameNotFoundException[LDAP error code 32 - 0000208D: nameErr DSID:03101c9 problem 2001 (no Object), data 0,best match of DC=mycomp, DC=isd, remaining name dc=mycomp, dc=isd
    [code]
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class JNDISearch2 {
    // initial context implementation
    public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
    public static String MY_HOST = "ldap://99.999.9.9:389/dc=mycomp,dc=isd";
    public static String MGR_DN = "CN=connectionID,OU=CO,dc=mycomp,dc=isd";
    public static String MGR_PW = "connectionPassword";
    public static String MY_SEARCHBASE = "dc=mycomp,dc=isd";
    public static String MY_FILTER =
    "(&(objectClass=user)(sAMAccountName=usersignonname))";
    // Specify which attributes we are looking for
    public static String MY_ATTRS[] =
    { "cn", "telephoneNumber", "postalAddress", "mail" };
    public static void main(String args[]) {
    try { //----------------------------------------------------------        
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, MY_HOST);
    // Security Information
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, MGR_PW);
    // Get a reference toa directory context
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results = ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while (results != null && results.hasMore()) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + ", " + MY_SEARCHBASE;
    System.out.println("Distinguished Name is " + dn);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    if (ar == null)
    // Has no attributes
    System.out.println("Entry " + dn);
    System.out.println(" has none of the specified attributes\n");
    else // Has some attributes
    // Determine the attributes in this record.
    for (int i = 0; i < MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS);
    if (attr != null) {
    System.out.println(MY_ATTRS[i] + ":");
    // Gather all values for the specified attribute.
    for (Enumeration vals = attr.getAll(); vals.hasMoreElements();) {
    System.out.println("\t" + vals.nextElement());
    // System.out.println ("\n");
    // End search
    } // end try
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    My JNDIRealm in Tomcat which actually does the initial authentication looks like this:(again, for security purposes, I've changed the access names and passwords, etc.)
    <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
    connectionURL="ldap://99.999.9.9:389"
    connectionName="CN=connectionId,OU=CO,dc=mycomp,dc=isd"
    connectionPassword="connectionPassword"
    referrals="follow"
    userBase="dc=mycomp,dc=isd"
    userSearch="(&(sAMAccountName={0})(objectClass=user))"
    userSubtree="true"
    roleBase="dc=mycomp, dc=isd"
    roleSearch="(uniqueMember={0})"
    rolename="cn"
    />
    I'd be so grateful for any help.
    Any suggestions about using the data from Active directory in web-application.
    Thanks.
    R.Vaughn

    By this time you probably have already solved this, but I think the problem is that the Search Base is relative to the attachment point specified with the PROVIDER_URL. Since you already specified "DC=mycomp,DC=isd" in that location, you merely want to set the search base to "". The error message is trying to tell you that it could only find half of the "DC=mycomp, DC=isd, DC=mycomp, DC=isd" that you specified for the search base.
    Hope that helps someone.
    Ken Gartner
    Quadrasis, Inc (We Unify Security, www -dot- quadrasis -dot- com)

  • Fetching data from a table and displaying it on the text box

    Hi,
    I have created a dialog program in which created a container(text box)  to enter data upto 1000 characters.
    Iam capturing the data and storing it in a custom table. In PBO I want to fetch data from my custom table (if data is already present :1000 characters data) and display it on screen.
    Please let me know how do i do it?

    hii Pavani,
    declare this two sttements in Screen
    MODULE STATUS_DATA.
    MODULE SELECT_DATA.
    In PBO, Under SELECT_DATA write Select query like:
    (considering the DB field to be text and Screen Field to be SC_TEXT)
    select text from <DB Table> into SC_TEXT where <condition>.
    *note if u r selecting more than one field than write fields in (   ),eg. (f1....f2) )
    Plz let me know for  any further queries.
    Regards,
    Apoorv

  • Fetch Data from BI system and populate a Table in webdynpro

    Hi,
    I have to fetch the data from BI system into a model and populate the Table.
    The data resides in BI system. I am creating model from adaptive RFC and the function module is RRW3_GET_QUERY_VIEW_DATA. This is the max information i have got to execute the query
    Infoprovider ZM_SC_GR
    Query T_SUPGR003
    Variable: Vendor Number
    VAR_NAME_1 SPRPVEN
    VAR_OPERATOR_1 EQ
    VAR_VALUE_LOW_EXT_1 Value
    VAR_VALUE_HIGH_EXT_1
    VAR_SIGN_2 I
    Variable: Purchasing Group
    VAR_NAME_2 CSMPGRP
    VAR_OPERATOR_2 EQ
    VAR_VALUE_LOW_EXT_2 Value
    VAR_VALUE_HIGH_EXT_2
    VAR_SIGN_2 I
    Variable: Calendar Day Range
    VAR_NAME_3 SPGRDT01
    VAR_OPERATOR_3 BT
    VAR_VALUE_LOW_EXT_3 Value1
    VAR_VALUE_HIGH_EXT_3 Value2
    VAR_SIGN_3 I
    I am not able to understand which parameters of the model I should map for context mapping to map cotroller with model.
    Thanks and Regards,
    Pankaj

    after you imported Rrw3_Get_Query_View_Data function as adaptive rfc model in your component and mapped its node controller context Rrw3_Get_Query_View_Data_Input model to your controller context do the following:
    i.e.
    Rrw3_Get_Query_View_Data_Input model = new Rrw3_Get_Query_View_Data_Input();
    model.setI_Infoprovider("0FIA_MDS2");
    model.setI_Query("FIA_MDS2_Q0005MP");
    wdContext.nodeGetQueryView().bind(model);
    W3Query paramElement1 = new W3Query();
    paramElement1.setName("VAR_NAME_1");
    paramElement1.setValue("0P_CSDAT");
    W3Query paramElement2 = new W3Query();
    paramElement2.setName("VAR_OPERATOR_1");
    paramElement2.setValue("LE");
    W3Query paramElement3 = new W3Query();
    paramElement3.setName("VAR_VALUE_EXT_1");
    paramElement3.setValue(cdate);
    W3Query paramElement5 = new W3Query();
    paramElement5.setName("VAR_NAME_2");
    paramElement5.setValue("0S_CCTR");
    W3Query paramElement6 = new W3Query();
    paramElement6.setName("VAR_OPERATOR_2");
    paramElement6.setValue("EQ");
    W3Query paramElement7 = new W3Query();
    paramElement7.setName("VAR_VALUE_LOW_EXT_2");
    paramElement7.setValue(mvz);
    W3Query paramElement8 = new W3Query();
    paramElement8.setName("VAR_VALUE_HIGH_EXT_2");
    paramElement8.setValue(mvz);
    W3Query paramElement9 = new W3Query();
    paramElement9.setName("VAR_SIGN_2");
    paramElement9.setValue("1");
    model.addI_T_Parameter(paramElement1);
    model.addI_T_Parameter(paramElement2);
    model.addI_T_Parameter(paramElement3);
    model.addI_T_Parameter(paramElement5);
    model.addI_T_Parameter(paramElement6);
    model.addI_T_Parameter(paramElement7);
    model.addI_T_Parameter(paramElement8);
    model.addI_T_Parameter(paramElement9);
    then execute
    wdContext.currentGetQueryViewElement().modelObject().execute();
    and invalidate output node
    and then you get the data from r3 system.
    then you should correctly parse output node and read the data from E_Axis_Data node E_Cell_Data node.

  • Fetch Data from BI system and populate a Table

    Hi,
    I have to fetch the data from BI system into a model and populate the Table.
    The data resides in BI system. I am creating model from adaptive RFC and the function module is RRW3_GET_QUERY_VIEW_DATA. This is the max information i have got to execute the query
    Infoprovider     ZM_SC_GR
    Query     T_SUPGR003
    Variable: Vendor Number
    VAR_NAME_1     SPRPVEN
    VAR_OPERATOR_1     EQ
    VAR_VALUE_LOW_EXT_1     Value
    VAR_VALUE_HIGH_EXT_1     
    VAR_SIGN_2     I
    Variable: Purchasing Group
    VAR_NAME_2     CSMPGRP
    VAR_OPERATOR_2     EQ
    VAR_VALUE_LOW_EXT_2     Value
    VAR_VALUE_HIGH_EXT_2     
    VAR_SIGN_2     I
    Variable: Calendar Day Range
    VAR_NAME_3     SPGRDT01
    VAR_OPERATOR_3     BT
    VAR_VALUE_LOW_EXT_3     Value1
    VAR_VALUE_HIGH_EXT_3     Value2
    VAR_SIGN_3     I
    I am not able to understand which parameters of the model I should map for context mapping to map cotroller with model.
    Thanks and Regards,
    Pankaj
    Edited by: pankaj pathak on Sep 9, 2010 12:25 PM

    after you imported Rrw3_Get_Query_View_Data function as adaptive rfc model in your component and mapped its node controller context Rrw3_Get_Query_View_Data_Input model to your controller context do the following:
    i.e.
    Rrw3_Get_Query_View_Data_Input model = new Rrw3_Get_Query_View_Data_Input();
    model.setI_Infoprovider("0FIA_MDS2");
    model.setI_Query("FIA_MDS2_Q0005MP");
    wdContext.nodeGetQueryView().bind(model);
    W3Query paramElement1 = new W3Query();
    paramElement1.setName("VAR_NAME_1");
    paramElement1.setValue("0P_CSDAT");
    W3Query paramElement2 = new W3Query();
    paramElement2.setName("VAR_OPERATOR_1");
    paramElement2.setValue("LE");
    W3Query paramElement3 = new W3Query();
    paramElement3.setName("VAR_VALUE_EXT_1");
    paramElement3.setValue(cdate);
    W3Query paramElement5 = new W3Query();
    paramElement5.setName("VAR_NAME_2");
    paramElement5.setValue("0S_CCTR");
    W3Query paramElement6 = new W3Query();
    paramElement6.setName("VAR_OPERATOR_2");
    paramElement6.setValue("EQ");
    W3Query paramElement7 = new W3Query();
    paramElement7.setName("VAR_VALUE_LOW_EXT_2");
    paramElement7.setValue(mvz);
    W3Query paramElement8 = new W3Query();
    paramElement8.setName("VAR_VALUE_HIGH_EXT_2");
    paramElement8.setValue(mvz);
    W3Query paramElement9 = new W3Query();
    paramElement9.setName("VAR_SIGN_2");
    paramElement9.setValue("1");
    model.addI_T_Parameter(paramElement1);
    model.addI_T_Parameter(paramElement2);
    model.addI_T_Parameter(paramElement3);
    model.addI_T_Parameter(paramElement5);
    model.addI_T_Parameter(paramElement6);
    model.addI_T_Parameter(paramElement7);
    model.addI_T_Parameter(paramElement8);
    model.addI_T_Parameter(paramElement9);
    then execute
    wdContext.currentGetQueryViewElement().modelObject().execute();
    and invalidate output node
    and then you get the data from r3 system.
    then you should correctly parse output node and read the data from E_Axis_Data node E_Cell_Data node.

  • HT4946 Can I back up my iPhone 4S to my ipad 3 (64 gb)? I do not have a computer. I deleted pictures from my iPhone and added then to the ipad, but now I don't have enough space in iCloud to backup either device. Why not?

    Can I back up my iPhone 4S to my ipad 3 (64 gb)? I do not have a computer running Mountain Lion. Our desktop still runs Tiger, so I purchased the 3rd generation iPad with 64 gb thinking it had had plenty of room to backup my iPhone photos. I used a camera connection kit and transferred about 1100 old photos from my camera roll on my iPhone to my ipad.  I then deleted pictures from my iPhone and now my camera roll has only 357 photos. However, in the Settings, under "About" it says I have 2147 photos. Why? I only have a total of 216 photos in all my albums. However, now I don't have enough space in iCloud to backup either device. Why not?  Any help, any advice, appreciated please! I spent a long time on the phone with Apple today and they couldn't solve the problem.

    rabidrabbit wrote:
    Can I back up my iPhone 4S to my ipad 3 (64 gb)?
    no
    rabidrabbit wrote:
    However, now I don't have enough space in iCloud to backup either device. Why not?
    iCloud only give so much space for free storage, then if you exceed the limit of 5gb you have to pay for additional storage.

  • Removing Exchange 2007 from SBS 2008 (In an Exchange 2010 Coexistance Scenario) - In order to remove 2007 Mailbox Objects from Active Directory and remove the SBS2008 server completely

    I'm trying to remove Exchange 2007 from an SBS 2008 server
    (Server 2008 Standard FE).  My ultimate goal is to completely remove the SBS 2008 Server from the network environment.
    We have an Exchange 2010 Coexistence Scenario and Mailboxes/Public Folders/etc have been moved over to the 2010 mail server, on Server 2008 R2.
    I have moved all Shares, FSMO roles, DHCP, DNS, etc over to their respective servers.  We have two full blown DC's in the environment.
    I'm ready to remove Exchange 2007 from SBS 2008 and DCPROMO the server.  I can NOT seem to find a TechNet article that shows me how
    to proceed in this kind of scenario.  I am trying to use the TechNet article:
    http://technet.microsoft.com/en-us/library/dd728003(v=ws.10).aspx
    This article references Disabling Mailboxes, Removing OAB, Removing Public Folder Databases, then uninstalling Exchange using the Setup Wizard. 
    When I go to Disable Mailboxes I get the following error:
    Microsoft Exchange Error
    Action 'Disable' could not be performed on object 'Username (edited)'.
    Username (edited)
    Failed
    Error:
    Object cannot be saved because its ExchangeVersion property is 0.10 (14.0.100.0), which is not supported by the current version 0.1 (8.0.535.0). You will need a later version of Exchange.
    OK
    I really don't see why I need to Disable Mailboxes, Remove OAB and Public Folder Databases since they have been moved to 2010.  I just want
    to remove Exchange 2007 and DCPROMO this server (actually I just want to remove any lingering Exchange AD Objects referring to the SBS 2008 Server, using the easiest and cleanest method possible).
    Can someone point me in the right direction?
    Thanks!

    Hi,
    Based on your description, it seems that you are in a migration process (migrate SBS 2008 to Windows Server
    2008 R2). Now, you want to remove Exchange Server and demote server. If anything I misunderstand, please don’t hesitate to let me know.
    On current situation, please refer to following articles and check if can help you.
    Transition
    from Small Business Server to Standard Windows Server
    Removing SBS 2008 –
    Step 1: Exchange 2007
    Removing SBS 2008 – Step 2:
    ADCS
    Removing
    SBS 2008 – Step 3: remove from domain / DCPROMO
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft
    does not guarantee the accuracy of this information.
    Hope this helps.
    Best regards,
    Justin Gu

  • How to open and read many files from a directory and store contents in 2D array?

    I want to make a VI that opens and reads the data from various files contained in a directory (200 files each with 2 columns) and store these in a single 2D array. For file number 1 I want to store the data from both columns in the 2D array, but for files 2 to 200 I only want to store the second column of each file. Can someone please help?

    Hi Nadav,
    Thanks for your help. I have followed your instructions but i cannot get it to work. I used the LIST DIRECTORY to list the files in the directory - that works. However, how do I read each of the 200 files using READ FROM SPREADSHEET FILE without me having to manually select each of the 200 files? So, if I use LIST DIRECTORY to list all 200 files in an array, how do I get each of these to open and store the data in a 2D array? Here is what I have done (File called read_files.VI) Could you please help me? Thank you very much in advance.
    Attachments:
    read_files.vi ‏18 KB

  • How to select variable filename from local directory with fn to load xml

    I would like to select a specific xml file to load from a local directory. The file name is composed of “Title” + “number sequence”.  I know the Title (in this case its XLink07), but I need to select the latest number sequence or the latest by date stamp.
    For example, the local directory has the following files:
    XLink01[36735298100].xml
    XLink02[36735298100].xml
    XLink02[36735298101].xml
    XLink07[36735298100].xml
    XLink07[36735298101].xml
    In this example I need to select file XLink07[XXXXXXXXXXX].xml where XXXXXXXXXXX is the highest number within the XLink07[XXXXXXXXXXX].xml files.  Title is Xlink07 and function should return Number sequence [36735298101]. Files with higher number sequence have later date stamps than files with lower number sequences. I need to select the highest number or the latest date stamp for the file that begins with XLink07….
    My action script to load the local .xml file without any function to select the correct file is:
    Security.allowDomain("*", "*")
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("XLink07[36735298101].xml"));
    xmlLoader.addEventListener(Event.COMPLETE, showXML);
    function showXML(e:Event):void {
    XML.ignoreWhitespace = true;
    var Innards:XML = new XML(e.target.data);
    tweet_name.text = Innards.XLink01[0].screen_name;
    tweet_1.text = Innards.XLink01[0].text;
    tweet_date.text = Innards.XLink01[0].created_at;
    Thanks for the help if anyone can script that function for me if its possible.

    If you develop for Flash browser plugin (not AIR), there is no way to read directories.

Maybe you are looking for