KM report - add folder & file count

Hi all,
I've just finished my custom report to report files and folders in a given time range.
After running one of the default EP reports under 'Content Administration' -> 'KM Content' -> 'Toolbox' -> 'Reports' : 'Delete', the report displays not only 'Found Items', but also 'Folder Count' and 'File count' in the 'schedule' tab.
How can these properties be added to a custom report?
Does anybody now where the default reports par file can be found? Seems like it's not on the file system.
Thanks for the help :o))

Hi Kevin,
you might try this trick as last instuction in your execute(..) method:
      List summary = new ArrayList();
      if(!useFramework) {
        summary.add(new Property(PN_RESULT_FOLDER_COUNT,new Long(folders)));
        summary.add(new Property(PN_RESULT_FILE_COUNT,new Long(files)));
      return receiver.finish("",ITEM_PROPERTY_NAMES, summary);
In fact this is the code block that creates the output in your referenced example.
Best regards,
Michael

Similar Messages

  • ITunes crashes when try to add songs to library both drag-drop and Add folder/file option

    I got the old iTunes updated, it crashed when open. Then I uninstall and download the newest iTunes. Restart my laptop.
    I even start iTunes in safe mode but it keep crashing.
    I try Add folder first, then Add file, then drag and drop. None of them work and I only have 700MB total of songs, no vids
    There were no pop up for error code or anything, iTune just crash when I try one of those add options.
    If anyone can help I would really appreciate

    after I got offline yesterday, I tried drag-drop again, it worked.

  • File count capacity?

    Just curious...
    I Just backed up over 60,000 images and put them into one folder called CR2.
    Is there a limit of the amount of files a folder can hold?
    I know file sizes are limited to OS and hard drive space, but what about file count or folder count?

    I'm not aware on any limit on folder file count. but it's hardly practical to put so many files in one folder. it's quite hard to scroll and it will take system resources just to render all items within when you open that folder.

  • Collect file count and add to CSV file.

    I have this script efficiently crafted by Jacques Rioux and I now what to do a little more with it.
    What it currently does is look on my desktop at a select number of Folders on my desktop. It then looks at the keyword information and then returns the results to a csv file.
    it looks for all the photographs; shot by Matthew. edited by Matthew etc.... with the date appended to the start and then the next time the script is run it adds the next data to the bottom of the last.
    The result looks like this
    19/12/2012,255,412,37,68
    27/12/2012,197,342,16,26
    From the fist line you can see on the 19th December 2012 I shot 255 images
    No what I would like it to do is:-
    a) Specifaically look in the folders of the desktop whose name begins with BH, BU, DA, DI, DO, FR, IN, NO, MA, TM, WA, PR, SE (These folders may or may not exist at the time, but are the only folders it should look at)
    b) also do a file count of the contents of the above individual folders and append it to the csv file. Again a folder may not exist. Where it doesn't exist the file count must = 0 so that it can then be added to the CSV file.
    This is how I hope the line to look like from the CSV file,
    19/12/2012,255,412,37,68, 5,3,20,25,60,101,25,0,85,5,40,0,0
    from the line above you can see that the folders NO, PR, and SE were all non existant and therefore a 0 was written in its place on the CSV file.
    Below is the working script that looks for the keywords.
    set spotlightqueryList to {"Shot by Matthew", "Editted by Matthew", "Shot by Shah", "Editted by Shah"}
    set thefolders to {"Desktop"}
    set thekind to "PSD"
    set csvFileName to "ProductivityLog.csv"
    set tHome to path to home folder as string
    set tc to count spotlightqueryList
    set theseCount to {}
    repeat tc times
              set end of theseCount to 0
    end repeat
    repeat with i in thefolders
              set thepath to my existsItem(tHome & i)
              if thepath is not "" then -- exists
                        repeat with j from 1 to tc
                                  set tQuery to item j of spotlightqueryList
                                  do shell script "mdfind -onlyin " & thepath & " " & tQuery & " " & thekind & " | wc -l" -- wc return the number of lines
                                  set item j of theseCount to (item j of theseCount) + (the result as integer) -- add the number of lines
                        end repeat
              end if
    end repeat
    set csvPath to "DCKGEN:Brands:Zoom:Online Photography:" & csvFileName
    set oTID to text item delimiters
    set text item delimiters to "," -- CSV delimiter
    set thisLine to (theseCount as text) -- convert list to text, each number is separated by comma
    set text item delimiters to oTID
    tell (current date) to set tDate to short date string
    set beginning of theseCount to tDate -- insert the date (first column)
    set csvPath to "DCKGEN:Brands:Zoom:Online Photography:" & csvFileName
    set oTID to text item delimiters
    set text item delimiters to "," -- CSV delimiter
    set thisLine to (theseCount as text) -- convert list to text, each number is separated by comma
    set text item delimiters to oTID
    --- append this line to CSV file
    do shell script "echo " & (quoted form of thisLine) & " >>" & quoted form of POSIX path of csvPath
    on existsItem(f)
              try
                        return quoted form of POSIX path of (f as alias) -- exists
              end try
              return "" -- else not exists
    end existsItem
    (* just a way to visually see it working
    set dialog to "Matt Shot: \"" & item 1 of theseCount & "\"" & return & return & "Matt Edit: \"" & item 2 of theseCount & "\"" & return & return & "Shah Shot: \"" & item 3 of theseCount & "\"" & return & return & "Shah Edit: \"" & item 4 of theseCount & "\"" & return & return
    display dialog dialog
    This is what I began to wrote but really have no idea how I would write it into the data into the CSV file and also I was struggling to get the non existant folder to = 0?
    tell application "Finder"
              set folderA to (get first folder of desktop whose name starts with "BH")
              set folderB to (get first folder of desktop whose name starts with "Bu")
              set folderC to (get first folder of desktop whose name starts with "Da")
              set folderD to (get first folder of desktop whose name starts with "DI")
              set folderE to (get first folder of desktop whose name starts with "Do")
              set folderF to (get first folder of desktop whose name starts with "Fr")
              set folderG to (get first folder of desktop whose name starts with "In")
              set folderH to (get first folder of desktop whose name starts with "Ma")
              if (exists (get first folder of desktop whose name starts with "No")) is true then
                        set folderI to (get first folder of desktop whose name starts with "No")
              else
                        set folderI to "0"
                        set folderJ to (get first folder of desktop whose name starts with "To")
                        set folderK to (get first folder of desktop whose name starts with "Wa")
                        if (exists (get first folder of desktop whose name starts with "SE")) is truethen
                                  set folderL to (get first folder of desktop whose name starts with"SE")
                        else
                                  set folderL to "0"
                                  if (exists (get first folder of desktop whose name starts with "PR"))is true then
                                            set folderM to (get first folder of desktop whose name starts with "PR")
                                  else
                                            set folderM to "0"
                                            set folderM to (get first folder of desktop whose name starts with "PR")
                                  end if
                        end if
              end if
              tell application "System Events"
                        set contentsA to (number of files in folderA)
                        set contentsB to (number of files in folderB)
                        set contentsC to (number of files in folderC)
                        set contentsD to (number of files in folderD)
                        set contentsE to (number of files in folderE)
                        set contentsF to (number of files in folderF)
                        set contentsG to (number of files in folderG)
                        set contentsH to (number of files in folderH)
                        set contentsI to (number of files in folderI)
                        set contentsJ to (number of files in folderJ)
                        set contentsK to (number of files in folderK)
                        set contentsL to (number of files in folderL)
                        set contentsM to (number of files in folderM)
              end tell
    end tell
    I hope someone can help me compile the remaining data.
    Many thanks
    Matt

    OK i've done my homework and I have been able to get a lot closer I just need to make the search specific to a number of folders on the desktop?
    Line 7 explains how I would like it to search.
    set spotlightqueryList to {"Shot_by_Matthew", "Editted_by_Matthew", "Shot_by_Shah", "Editted_by_Shah"}
    set spotlightqueryList2 to {"AL70", "BH70", "BH70", "BU40", "ES20", "DV25", "DJ30", "RA30", "FR10", "GT55", "MA65", "MB65", "MC65", "FI65", "MF65", "MH65", "NN_", "TM15", "WA35", "PR_", "SE_"}
    set thefolders to {"Desktop"}
    --Here I need to limit the search so that it only looks in folders of the desktop whose name begins with "BH", "BU", "DA", "DI", "DO", "FR", "IN", "MA", "NO", "TM", "WA", "PR", "SE"
    set thekind to "PSD"
    set csvFileName to "ProductivityLog.csv"
    set tHome to path to home folder as string
    set tc to count spotlightqueryList
    set theseCount to {}
    repeat tc times
              set end of theseCount to 0
    end repeat
    set tc2 to count spotlightqueryList2
    set theseCount2 to {}
    repeat tc2 times
              set end of theseCount2 to 0
    end repeat
    repeat with i in thefolders
              set thepath to my existsItem(tHome & i)
              if thepath is not "" then -- exists
                        repeat with j from 1 to tc
                                  set tQuery to item j of spotlightqueryList
                                  do shell script "mdfind -onlyin " & thepath & " " & tQuery & " " & thekind & " | wc -l" -- wc return the number of lines
                                  set item j of theseCount to (item j of theseCount) + (the result as integer) -- add the number of lines
                        end repeat
              end if
    end repeat
    repeat with i2 in thefolders
              set thepath2 to my existsItem2(tHome & i2)
              if thepath2 is not "" then -- exists
                        repeat with j2 from 1 to tc2
                                  set tQuery2 to item j2 of spotlightqueryList2
                                  do shell script "mdfind -onlyin " & thepath2 & "  -name " & tQuery2 & " " & thekind & " | wc -l" -- wc return the number of lines
                                  set item j2 of theseCount2 to (item j2 of theseCount2) + (the result as integer) -- add the number of lines
                        end repeat
              end if
    end repeat
    set csvPath to "DCKGEN:Brands:Zoom:Online Photography:" & csvFileName
    set oTID to text item delimiters
    set text item delimiters to "," -- CSV delimiter
    set thisLine to (theseCount as text) -- convert list to text, each number is separated by comma
    set thisLine2 to (theseCount2 as text) -- convert list to text, each number is separated by comma
    set text item delimiters to oTID
    tell (current date) to set tDate to short date string
    set beginning of theseCount to tDate -- insert the date (first column)
    set csvPath to "DCKGEN:Brands:Zoom:Online Photography:" & csvFileName
    set oTID to text item delimiters
    set text item delimiters to "," -- CSV delimiter
    set thisLine to (theseCount as text) -- convert list to text, each number is separated by comma
    set thisLine2 to (theseCount2 as text) -- convert list to text, each number is separated by comma
    set text item delimiters to oTID
    --- append this line to CSV file
    do shell script "echo " & (quoted form of thisLine) & (quoted form of thisLine2) & " >>" & quoted form of POSIX path of csvPath
    on existsItem(f)
              try
                        return quoted form of POSIX path of (f as alias) -- exists
              end try
              return "" -- else not exists
    end existsItem
    on existsItem2(f)
              try
                        return quoted form of POSIX path of (f as alias) -- exists
              end try
              return "" -- else not exists
    end existsItem2
    (* just a way to visually see it working
    set dialog to "Matt Shot: \"" & item 1 of theseCount & "\"" & return & return & "Matt Edit: \"" & item 2 of theseCount & "\"" & return & return & "Shah Shot: \"" & item 3 of theseCount & "\"" & return & return & "Shah Edit: \"" & item 4 of theseCount & "\"" & return & return
    display dialog dialog

  • File names get jumbled when using Add Folder to Library

    I have a set of .mp3 files created by playing vinyl LPs into a software sound recorder. Each of these is named with a number as the first two characters of the file name (the track number) and then the name of the song.
    I create the appropriate folder with the ArtistName and subfolder with the AlbumName in the Itunes directory and then copy the .mp3 files into the subfolder.
    My problem occurs when I 'Add Folder to Library'. The .mp3 files don't change, but the names of the tracks listed in the Itunes library are goofed up. There is no strict pattern, but mainly it shows the 3rd track having the 2nd track's name, the 4th track has the 3rd track's name, etc. I have to go back and rename all the tracks to make the Itunes Library match the actual .mp3 files. (I can tell they are mis-assigned by the file sizes).
    It might be a Windows-only thing, I'm not sure. Any idea how I can make the Itunes Library match its index to the actual files added when importing? Or is there some other technique I should use to import these .mp3 files?
    It is possible it is related to the fact that that initially the internal data in the .mp3 files merely shows 'Freecorder' for the Album and Artist in every file.
    Where can I report this as an 'official' bug to Apple?
    Gregg Cattanach
    Message was edited by: GreggCattanach

    Actually, your suggestion was somewhat helpful. It wasn't the 'Freecorder' in the Artist and Album slots. But when I look at the properties of the files generated by Freecorder in Windows Explorer, it appears the internal file names are being mis-matched with the actual .mp3 file names, so it's Freecorder that's creating the problem.
    Interesting. OK, It looks like it isn't an Itunes problem after all. But it's easy enough to edit the internal properties tags (Windows Explorer/ Right-Click / Properties / Summary) before I add the folder to Itunes.
    Thanks.
    Message was edited by: GreggCattanach

  • HT201272 frustrated! I bought music off my iphone & now trying to get it on my computer.  I see it under purchased and the files are on my computer but when I go to add folder or file to library, it doesn't recognize it or add the songs to my librarby.  H

    I don't understand what I am doing wrong.  Bought music straight off my phone.  When I log on my computer, I see it under purchased items.  I downloaded them to my computer and see the files with all my other music.  However, when I go to file, add folder to library...it doesn't do anything and the songs won't add to m library.  ????

    Open itunes, connect iphone, click File>Devices>Transfer Purchases

  • I'm trying to copy music from my PC to itunes. I open itunes, go to 'file', go to 'add folder to library', select the folder and nothing happens. What am I doing wrong?

    I'm trying to copy music from my PC to itunes. I open itunes, go to 'file', go to 'add folder to library', select the folder and nothing happens. What am I doing wrong?

    Hello there, gleab.
    The following Knowledge Base article reviews the ways to import content into iTunes:
    Adding music and other content to iTunes
    http://support.apple.com/kb/ht1473
    Also keep in mind which formats can be added:
    You can add audio files that are in AAC, MP3, WAV, AIFF, Apple Lossless, or Audible.com (.aa) format. If you have unprotected WMA content, iTunes for Windows can convert these files to one of these formats.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • File Adapter - how to get the file count from a folder

    Hi All,
    I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a folder using file adapter ?? otherwise please suggest me an approach to achieve this requirement.
    Thanks,
    JJ

    Hi Sarath,
    Thank you for your reply.
    Go with the list files operation of file adapter it will gives you the number of files in the specified folder as you given. . - this step is already done.
    When the number of files reaches your count startup your webservice that which can polls the files. . . - how can i acheive this?? Have to poll the directory and process the number files - please let me know, what could be added to the webservice which is being invoked after cheking file count from parent process.
    The reason for the above question is - we cannot use ReadFile operation in second webservice because it will be automatically triggered when the file is avilable. Also SyncRead operation supports reading one file in b/w bpel process. Kindly explain me the implementation steps.
    Thanks,
    JJ

  • Add Folder - is there a limit to the number of files you can add in one go?

    I have a fairly large collection (60GB+) of 192kbps mp3 files which are stored under My Music in a folder structure of Artists / Album, e.g. "My Music \ ACDC \ Back in Black\ Hells Bells.mp3"
    I recently bought an ipod and having installed itunes I wanted to add all my music. I figured out that the way to do this is to go File / Add Folder and select the "My Music" folder.
    However, itunes starts adding the mp3s and stops at the Bruce Springsteen folder. At this point the itunes library can see all the "A" folders and the "Bs" up to and including Bruce Springsteen. If I try the process again nothing happens.
    However, if I then try to add a specific folder e.g. "My Music \ Charlatans" it works.
    This suggests to me that the Add Folder option has a limit to the number of files it can process.
    Any thoughts on this would be appreciated as I'm not looking forward to manually adding a hundred or so folders.
      Windows XP  

    Well the part about putting songs in the "iTUnes Music" folder I only brought up because it seemed you liked things very organized. You could use iTunes to so all the organizeing. Plus once you add something to the iTUnes library, if you change ANYTHING about it in windows explorer, like its name, change the name of the folder its in or move it to another folder, iTUnes "Looses Track" of it. Its not like other programs that "Watch" files and folders for changes outside its "iTUnes Music" folder
    But to have iTUnes auto search, you have to delete a hidden pref file. After doing this, when you open iTUnes again it will throw up a setup wizard, just like its the first time ever installing it. Its in this wizard where you get your ONLY chance to have iTUnes auto search and add files from the system. Just goto the link below and follow Scott P's steps
    http://discussions.apple.com/message.jspa?messageID=607357
    Also since your new to the ipod, you my want to check out the "iPod 101" section so you can learn the ropes of everything
    http://www.apple.com/support/ipod101/

  • How do I add a "file folder" to my TC so that I can save files directly to the TC?

    I am trying to figure out how I can add a "File Folder" to my TC so that I can save files directly to it? The only folder it displays is "Data" which is where my bac ups save...

    Double click on the "Data" folder in the Finder under the SHARED heading, and then click the gear icon at the top of the window and select New Folder.
    You can name this folder anything you wish and also create as many folders as you wish.
    If you are also using the Time Capsule drive for Time Machine backups, it is not really recommended that you "mix" regular files with Time Machine backups because there will be a struggle for space on the drive at some point.
    If you have plenty of free space on the Time Capsule drive, you may be OK with keeping a portion dedicated for regular files.

  • HT1473 Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option wha

    Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option what am i doing wrong?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

  • How can I add .m4r files (thatI have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes ans it won't let me drag the files to the sidebar...

    How can I add .m4r files (that I have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes and it won't let me drag the files to the sidebar...thanks!

    How can I add .m4r files (that I have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes and it won't let me drag the files to the sidebar...thanks!

  • Add-CMDeploymentType: How to add a file/folder detection method

    Hello all,
    I'm discovering how to add applications & deploymenttypes to my SCCM deployment through Powershell.
    Adding the application went smoothly, but I'm struggling a bit at the deploymenttype.
    I want to add a file/folder detection clause as you can in the admin console, but it seems that that the Add-CMDeploymentType cmdlet doesn't allow this..
    Am I correct?
    Can you only add a scripted detection clause to the deploymenttype?
    For now I've just added the following Powershell detection clause:
    Test-Path %PATH_TO_A_FILE_OF_THE_APP%
    This will then return true after the application has installed.
    Thanks for your insights on this!
    Filip

    Hello Christopher,
    command I execute:
    I've just tried what you suggested, but now the path to the detection script just gets put into the script content window, instead of the contents of the file..
    http://sdrv.ms/1fx6wnN
    This is the command I execute:
    $NewDT=Add-CMDeploymentType
    -ApplicationName
    $AppName
    -ScriptInstaller
    -DeploymentTypeName
    "Local Install"
    -InstallationProgram
    $DTProgram
    -InstallationBehaviorType
    $DTBehavior
    -LogonRequirementType
    $DTLogonReq
    -ContentLocation
    $DTContentLocation
    -ManualSpecifyDeploymentType
    -DetectDeploymentTypeByCustomScript
    -ScriptType
    Powershell
    -ScriptContent
    \\syn-sccm01\sources\SCCM\Packages\PSTest\GoogleEarthDetection.ps1
    Should I quote that path somewhere?
    Thanks!

  • My computer has just prompted me to download the newest version of Itunes and now there doesn't seem to be any option to "add folder" to library, just "add file to library" so have to do one song at a time and is very time consuming!!  Help?!

    My computer has prompted me to install the newest version of Itunes and now there doesn't appear to be any option to "add folder to library", only "add file to library" so have to do each song individually and very time consuming....help!  Anyone know if I can get this feature back?  Thanks so much, Charlotte

    Use CTRL+B to put the top menu bar back on screen. Add File to Library and Add Folder to Library are both under File.

  • I have files in my iTunes media folder that somehow are not in my library. How do I get iTunes to scan my media folder and add missing files to my library without making a copy of each file in the same location?

    I have files in my iTunes media folder that somehow are not in my library. How do I get iTunes to scan my media folder and add missing files to my library without making a copy of each file in the same location? If I use add file / folder to library, it scans the folder and then makes a copy of any file that is not in my library in the exact same location; I recal in older versions of iTunes being able to just drag my media folder into my library and it would update missing links.

    Only the songs that are connected to iTunes will be copied when you consolidate to a new folder.
    Splitting the media folder away from the usual location makes it harder to move iTunes in the future.
    Are you go move everything back once you've tidied up or are you going to leave it that way? Either way I'd recommend you create an iTunes folder at the new location, an iTunes Media folder inside that, and consolidate to this new iTunes Media folder. You should also use the option File > LIbrary > Organize Library > Rearrange files in the folder "<Media Folder"> if you have not already done so.
    tt2

Maybe you are looking for

  • Qaaws  in release 2

    i know query as web service in release 3. is it possible  qaaws in release 2.please let me know the steps where i can get the qaaws in release 2.

  • Can't figure out last part of a powershell script

    Hey guys, First time posting here. I have a powershell project for school that I'm trying to figure out. I don't have a lot of experience with powershell, but I've gotten most of my project done. I am having issues with this last part. Here is the pa

  • Output the record

    hi this is ravi please help me how to code for the folling Create a work area with the following fields o        EMPNO o        EMPNA o        EMPID o        EMPDA (Joining Date) o        EMPSA (Salary) 1. Initialize the EMPDA to 30/01/2008 and EMPSA

  • Settings to Prevent Pink Photos?

    I'm frustrated. I have an HP C7280 all-in-one and I cannot solve the pink photo issue. I have searched the forum and the overwhelming "solution" is the ink cartridges are low or old. This is not the case for me. We tend to replace the cartridges fair

  • DON'T UPDATE TO 4.0.2 but if you did try this

    Well hopefully you are not reading this becuase like me your were "stupid" enough to cave in to the freaking "nags" on I-Tunes and updated your I-Phone software to 4.0.2. Now your phone is no better than a coffee can and a string. Anyway I know it ha