Traversing all directories and listing all file objects

Hi
I am wondering if someone can help me out.
In IFS, I would like to traverse recursively down all directories starting from a particular directory to be set by me, and collect all objects that are file objects, say in an Array of PublicObjects. However the listing should exclude folder objects. Obviously the folder objects would be used to traverse further down the directory tree and collect more (file) PublicObjects.
I have tried a few things but I can't seem to distinguish between folder and file objects. If someone could provide me with a code example to get me started that would be tremendously appreciated.
Thanks very much.
Hugo

Can you not just test for an instance of Folder?

Similar Messages

  • FM to get list of all directories and files on application server..

    Hi All,
    Can anyone tel me FM to get list of all directories and files on application server..i know 'F4_DXFILENAME_TOPRECURSION'
    and '/SAPDMC/LSM_F4_SERVER_FILE' these are working too...but my requirement is when i click F4 i should get list of directories and whn i select one of these the only directory name should display.....and whn click again for 2nd text box field i want file name ...means directory name in one text box field and file name in another....plz help me out..
    helpful answers wil b awarded.
    Thanks,
    Jayshree

    Hi Jayashree
    Please check this FM, SUBST_GET_FILE_LIST. Pass the file path and file name, if it returns an entry in table FILE_LIST, then the filename and path are valid.
    Hope this helps !
    ~ Ranganath

  • Release date set to 1/5/11 for all podcasts and iTunes U files

    I have an ongoing problem with iTunes on my MacBook Pro where the release date is set to 1/5/11 for all podcasts and iTunes U files. Although I can seemingly correctly sort by release date, the date is the same across all files. Can someone advise as to how I might go about correcting this such that the actual, proper, release date is shown? Thanks in advance for the help! - mvrb

    @King_Penguin thanks for your help
    See below some additional info:
    I have 3 Macs:
    1 X MBPr 2012 (OS X 10.9.1
    1 X MBPr 2012 (OS X 10.8.5)
    1 X iMac 2009 (OS X 10.8.5)
    1) All 3 Macs have access to same accounts and have same apps in iTunes.
    2) Problem is only found on both MBPr's 2012 with one NL and 1 US account. With one NL account (inactive) I have no issue on all three.
    FYI I have multiple iTunes accounts: 2 for the Netherlands and 1 for US. 
    I also tried this after deleting the only 2 apps I got from the US iTunes Store but that did not solve my issue.
    I think the matter is related to my iTunes account(s) and NOT to a computer (prefs file)

  • Can you sort ibookshelf books by collections and list all of the books in each collection?

    can you sort ibookshelf books by collections and list all of the books in each collection?

    The collection changes a little by the criteria you use to view the books, and you can view them by Title, Author, and Category. So, yes, you can.
    The default view is Book view. On the upper right part of the page, you'll see four white blocks - that's the icon for book view. The icon on the right has three white lines; that's where you find Title, Author, and Category view. You can't create folders in any view.

  • AppleScript - Writing to non-existent directories, and non-existent files..

    All,
    AppleScript - Writing to non-existent directories, and non-existent files...
    Creating directories several levels deep on the fly.
    How do we write to a file that does not exist, buried deep down in a hierarchy of directories that don't exist either...
    In trying to do this I explored two options. One used AppleScript, assisted by UNIX, which was simplicity itself, the other one used only AppleScript and was considerably more complex, and slower.
    http://www.mac-specialist.com/r/asckdirs.html
    Hope these are useful,
    Best Regards,
    Bill Hernandez
    Plano, Texas

    Simplified code examples - lacking extensive error checking -
    UNIX example 001:
    set file_Name to "Sales Figures.txt" -- File to create.
    set file_Path to "2006 Sales:Forecast:Fruits:Flordia:Oranges:Large" -- Folder to create.
    set UNIXfilePath to (quoted form of (POSIX path of file_Path))
    try
    do shell script "mkdir -p " & UNIXfilePath -- Attempt to create a folde, and respective intermediary folder(s).
    end try
    try
    do shell script "touch " & UNIXfilePath & "/" & file_Name -- Attempt to create a blank file.
    end try
    UNIX example 002:
    set file_Name to "Sales Figures.txt" -- File to create.
    set file_Path to "2006 Sales:Forecast:Fruits:Flordia:Oranges:Large" -- Folder to create.
    try
    do shell script "mkdir -p " & (quoted form of (POSIX path of file_Path)) -- Attempt to create a folde, and respective intermediary folder(s).
    end try
    -- Create a file, and enter some text.
    set FREF to open for access file (file_Path & ":" & file_Name) with write permission
    write "Beispieltext" to FREF
    close access FREF
    AppleScript example:
    set file_Name to "Sales Figures.txt" -- File to create.
    set file_Path to "2006 Sales:Forecast:Fruits:Flordia:Oranges:Large" -- Folder to create.
    -- Obtain list of text items of 'file_Path'.
    set {oAStID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
    set filePathList to text items of file_Path
    set AppleScript's text item delimiters to oAStID
    tell application "Finder"
    set folder_Path to name of startup disk -- Obtain name of boot disk.
    repeat with i in filePathList -- Cycle through list.
    try
    make new folder at folder_Path with properties {name:i} -- create folder.
    set folder_Path to folder_Path & ":" & i -- Create new path for next new folder.
    end try
    end repeat
    end tell
    -- Create a file, and enter some text.
    set FREF to open for access file (folder_Path & ":" & file_Name) with write permission
    write "Beispieltext" to FREF
    close access FREF
      Mac OS X (10.4.4)  

  • Read and List the Files from Remote Webserver Path

    Hi All,
    I have requirement where i need to Read and List the files from a Folder of Remote webserver path using JAVA.
    Remote webserver is within the network only...No Firewall and also Access is given to Read the folder. No Issues on this.
    Folder will just contain some PDF files...
    I just need to display the PDF file names available in the Folder..
    No need to read the PDF File...Only required to read the folder to list the file names in it.
    Looking forward some workaround to this.
    Thanks and Regards.

    I need to read the folder from a webserver path of different machine...
    File dir = new File( prop.getProperty("inputPath"));
    File[] files = dir.listFiles(fileFilter);     
    final String match=siteName;
         final String type=reportType;
         Calendar c1 = Calendar.getInstance();
         c1.add(Calendar.MONTH, - Integer.parseInt(prop.getProperty("filterMonths"))); //Filters reportes generated in last X months (X picked from config file)           
         final long filterDate = c1.getTime().getTime();           
         FileFilter fileFilter = new FileFilter() {
         public boolean accept(File file) {
         long fileLastModiDate = file.lastModified();      
         if((fileLastModiDate >= filterDate) && (file.getName().toLowerCase().startsWith(match)) && ( (type.equals("M") && file.getName().indexOf("WIP")==-1) || ((!type.equals("M") && file.getName().indexOf("WIP")!=-1)) ) ) {                        
              return true;
         }else {
              return false;
    Here it works fine if the input path is local machine..
    But i need to know how to give the input path as WEBSERVER PATH of different machine??

  • Install, Match (X) or Copy, Merge all below and Copy all below

    Hi,
    Can any one please tell me when can we use only "Install", combination of both "Install and Match (X) or Copy" and only "Match (X) or Copy" Indicatiors.
    And what is Match (x) or Copy, are they different from each other or they are one and same? if there is difference what is the diff between Match (x) and Copy.
    And what is the use of "Merge All Below" and "Copy All Below" in the context menu of the objects that are collected.
    Regards,
    Kumar.

    Hi,
    Install
    -> Objects that are being transferred for the first time. There is not an active version of these objects in the system.
    ->Business Content objects that have been redelivered in a new version. These objects are identified by the Content time stamp in the corresponding object tables.
    Match (X) or Copy
    If the SAP delivery version and the active version can be matched, a checkbox is displayed in this column.With the most important object types, the active version and the SAP delivery version can be matched.
    The Match indicator is set as default in order to prevent the customer version being unintentionally overwritten. If the Content of the SAP delivery version is to be matched to the active version, you have to set the Install indicator separately.
    The active version is overwritten with the delivery version if
    -> the match indicator is not set and
    -> the install indicator is set.
    In other words, the delivery version is copied to the active version.
    If the Install indicator is not set, the object is not copied or matched. In this case, the Match indicator has no effect.
    In the context menu, two options are available:
    a.      Merge All Below
    The object in the selected hierarchy level and all objects in the lower levels of the hierarchy are selected as to Match.
    b.      Copy All Below
    The Match indicators are removed for the object in the selected hierarchy level and all objects in the lower levels of the hierarchy. If the Install indicator is also set, these objects are copied from the delivery version to the active version.
    The most important properties which are taken into account when versions are matched are now listed.
    For further information check this link [Installing Business Content |http://help.sap.com/saphelp_nw04/helpdata/en/80/1a66d5e07211d2acb80000e829fbfe/content.htm]
    Hope this helps....
    Rgs,
    Ravikanth.

  • HT5243 It says on the "Java for Mac OS X 10.6 Update 8" pg that this download is for all users and supercedes all earlier versions. Yet to the right is says you HAVE to have 10.6.8 as a requirement. WHICH is it?  Is it for all versions of 10.6 or not?

    It says on the "Java for Mac OS X 10.6 Update 8" pg that this download is for all users and supercedes all earlier versions. Yet to the right is says you HAVE to HAVE 10.6.8 as a requirement. WHICH is it?  Is it for all versions of 10.6 or not? Why isnt this made more clear?
    And question is STILL not answered.  WHICH is to be downloaded and used?
    I would like an answer.

    Thank you for the clarification!  It is really kinda circle-speaking to state on an information page to put forth info people need in that manner.  It really does add to the confusion and frustration when you need a simple,
    straight answer, such as you gave, and you dont get one.  Kind of like that . . other... software company....
    This rabbit hole still continues, though.  I'm going to ladder it out, just to see for myself:
    Have: MacBookPro / 2.4 GHz/ Intel Core i5/ running OS X 10.6.3 -
    Need: latest version of Java, so Flash update can be loaded;
                                  (want html5 to be the standard so badly, but client wants Flash)                  
      Attempted:  Tried to find Java for Mac OS X 10.6 Update 2 on Apple website.  No Joy.
            Found:   Update 2 is proper update for Mac OS X 10.6.3.  Could not find download on Apple website;
                           - No Joy.
      Attempted:  Tried to find Java for Mac OS X 10.6 Update 8. Half Joy. Confusing, no straight info.
            Found:   In order to install update for Java, must update OS X from present 10.6.3 to 10.6.8
      Attempted:   Tried to find update to OS X 10.6.3 to 10.6.8. on Apple website.
    how far does the rabbit hole go?

  • Estimate time to enable all constraints and create all indexes

    Hi,
    To prepare a project to export/import for a whole database,
    How can I estimate time required to enable all constraints and create all indexes
    * Assume one full table scan per one FK constraint
    * Assume one full table scan plus one sort/merge operation per one index
    * Check it out whether we can use parallel DDL feature to speed up enabling of FK constraints
    how can I use core schema (which will be exp/imp) in the production db to get needed metric for the calcualtion?
    thanks
    Jerry

    There is no definative way to find the time it takes to enable a constraint / create a Index
    It toatally depends on the Size of the table / execution plan / resources available (In terms of CPU and Physical Memory ) /
    Amount of Temporary tablespace

  • Large number of duplicate listings of songs. 1 (or several) is found and then 1 or more with the circled "!" in col 1. I would like to automatically delete all duplicates and then all marked as not found.

    large number of duplicate listings of songs. 1 (or several) is found and then 1 or more not-found with the circled "!" in col 1. I would like to automatically delete all duplicates and then all marked as not found. How do I do this without losing my one good copy?

    large number of duplicate listings of songs. 1 (or several) is found and then 1 or more not-found with the circled "!" in col 1. I would like to automatically delete all duplicates and then all marked as not found. How do I do this without losing my one good copy?

  • Download all roles Individually and list all the SAP standard roles

    Hi ,
    I have two questions .
    1. I want o download all the roles individually in SAP.
    2. I want to list all the SAP standard roles whose profile is generated.
    Can anyone help me . to achieve this

    Dear,
    I am no sure what kind of problem you have faced that requires revert back. Which took 2 days. If it's for mass role revert back then mass role download should work. If it few selective role then change history should help you out.
    Anyway I might pull this out of the topic.
    Even you download mass role in a single file then also if you want then can upload a single role only with 2-3 mins spending on replace function in notepad!!
    Let say you have taken 1000 role in a single file and want to upload a specific role only. Open the file (copy of the file) in a notepad. Now replace(Ctrlh) LOADED_AGRS with nothing. Find(Ctrlf) the role you want to upload. In begining of that line paste LOADED_AGRS
    Above file will upload the specific role only.
    Regards,
    Arpan Paik

  • Upload directories and/or multiple files

    What's the easiest way to let a user upload multiple files or entire directories? I know the html input file tag only allows one per text box, but i would like the user to be able to select groups of files or specify an entire directory to upload. Could somebody help me with this?, thanks in advance

    Yes Thru a web browser!!!... but i don't want to force the users to click the browse button everytime they want one or more files. I need something that will allow me to click shift or control and select multiple files or just a directory. Anything you can know about it please just let me know it?

  • I have an exel file on my idisk. When transferring it to numbers on my Ipad, it loses all formulae and basically all rules setup in the file. Is there anything i can do about that?

    I recently tried importing a exel file from my Idisk to numbers on my Ipad. It did it succesfully but took out all the formulas, and other hidden settings. Is there a way to import the file with out losing all of that?

    In Excel there are about 500 functions with their own syntax in formulas.
    In Numbers there are about 200 functions with their own syntax in formulas.
    Is it surprising that formulas are dropped in the import scheme ?
    I think that it's normal.
    Same thing for 'hidden settings'.
    Numbers was never described as a clone or even a substitute to Numbers.
    If it doesn't fit your needs, use an other tool.
    It's mainly because Numbers is not resembling to Excel that many of us use it, so we hope that it will never do that.
    Yvan KOENIG (VALLAURIS, France) jeudi 1 septembre 2011 15:50:43
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • I pad syncs and lists all apps being transfered from Ipad, but...

    Hi,
    After syncing, or transfering apps from my ipad, I can see only the apps I have bought from itunes on my computer, not the apps on my ipad. Also, when I delete from my ipad, after syncing they all come back and my screens are completely full - I can't access any of the newer purchases.
    Thanks

    What exactly did you try? You have to restore the iPad from the phone backup and download the apps again if you are using iCloud. If you are using iTunes, the process is basically the same but you have to sync the apps back to the iPad.

  • The user "Admin" is stuck in the document properties of all excel and power point files

    Does anyone know how I can clear this out, so the document properties show the actual author of the document? via script or regedit the problem exists on 2000 computers.

    Hi,
    Sounds like the user settings of the Office installation is set to Admin. Has the installation been done by some script?
    You can check if this is the case by looking at the File - Options and have a look of what the username is set to. I think it would be relatively easy to ask the user to enter their initials.
    Maurice

Maybe you are looking for

  • How can I retrieve file name being processed in Batch

    Hi All I want to retrieve the current filename that is being processed by a batch, e.g. A1~Texas~Actual~Jan-2010~RR.txt I can do this in various event scripts that have the strFile parameter but I need to do it in the BatchAction event script and can

  • File to Idoc ( RFC lookup )

    Hi, I need to create File to Idoc scenario with the use of RFC lookup. Need to do some currency lookups based on country specific values in file and pass this information to IDoc. what are the steps I need to follow to complete this scenario? a) Do I

  • Fast Mac Pro PATA HD

    Hi Guys, The Mac Pro came today and I started taking it apart. I took out the SuperDrive and it uses the Sony DW150. First time I have used on of these. Too bad Pioneer no longer fills the SuperDrive billing in the Mac Pro. I also found that a PATA h

  • Mac Pro all of the sudden does not recognize my TV

    Hey Everyone I just got a 13 in MBP and have been connecting it to my TV using the mini display port and hdmi cable. Everything has been great for the past month until today. I was gonna steam a movie from my MBP to TV but my TV screen stayed black a

  • BC4J deployment thoughts and questions

    Hi, As I've said before on this forum we are developing a pretty big system using the BC4J framework. That's why we divided the system in several (sub-)projects. We also created some workspaces which groups projects that belong together. When a certa