Get folder name for item

Hi All,
I need to retrieve the folder name for where the item is stored to generate a report in following format in csv
File Name Full Path Parent Folder Created By Last Modified By Number of Versions Total Size
My code which gets all other info.
function Get-DocInventory() {
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site=Get-SPSite -Identity "siteURL"
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
if ($list.BaseType -ne "DocumentLibrary") {continue}
foreach ($item in $list.Items) {
$data = @{
# "Web Application" = $webApp.ToString();
#"Web" = $web.Url
"Site" = $site.Url
"list" = $list.Title
"Item ID" = $item.ID
"Item URL" = $site.Url+"/"+$item.Url
"Item Name"= $item.File.Name
“Item Versions” = $item.Versions.Count
"Item Created" = $item["Created"]
"Extensions" = $item.name.split(".")[1]
"Item Modified" = $item["Modified"]
"Item Created By" = $item["Author"]
"Last Updated by" = $item["Editor"]
"File Size" = $item.File.Length/1KB
New-Object PSObject -Property $data
$web.Dispose();
$site.Dispose()
#Get-DocInventory | Out-GridView
Get-DocInventory | Export-Csv -NoTypeInformation -Path D:\Scripts\Hemant\inventory.csv
Coukld you please help me get folder name
Thanks Basva

To get the full Folder URL you could use:
$item.File.ParentFolder.Url
And just for the Folder Name use:
$item.File.ParentFolder.Name

Similar Messages

  • What is the field name for item serial number

    hi all
    i am doing dispatch report .... i need field name and table name for [item serial number (min) from batch number of that delivery material,item serial number (max) from batch number of that delivery material] ... actually this was the exact term given in the spec. can any one help me out
    regards
    aswin

    some more tables :
    SER00 .. SER08 , or type SER* in SE11 and press F4, you will get some more.
    and <a href="http://www.erpgenie.com/sap/sapfunc/serialnumbers.htm">Check this</a>

  • I keep getting ' user not register for online ' when trying to get track names for my CD imports for Windows 7

    I keep getting ' user not register for online ' when trying to get track names for my CD imports for Windows 7 and I'm unable to find a solution.

    I can't be certain exactly which steps are going to be needed in each case, but if you work through this in sequence hopefully one of the steps will prove effective.
    First try this:
    With iTunes closed.
    Press the WinLogoKey+R
    Type in %appdata% and press return
    Double click on Apple Computer
    Double click on iTunes
    Delete the file CD Info.cidb
    Start iTunes and try again.
    If that doesn't work close iTunes and try deleting com.apple.iTunes.Gracenote.plist in the same folder.
    If that doesn't work close iTunes and try deleting iTunesPrefs.xml. This will reset your some of your preferences in iTunes so be sure to check them and reset as required.
    If that still hasn't resolved things close iTunes and try deleting the entire %appdata%\Apple Computer folder or look for parallel files/folders in the C:\Users\<User>\AppData\Local or C:\Users\<User>\AppData\LocalLow in case a corrupt file is persisting there.
    Note that any iOS device backups are stored in the MobileSync folder within Apple Computer. Once things are working you should backup your devices again as soon as possible.
    Or it might not be the preference files after all...
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • HP ePrint from excel add-in: Error while getting driver name for printer

    Trying to use add-in for ePrint from excel/word I get, "error while getting driver name for printer \\...HP DesignJet 800PS 42 by HP," with an option to select "OK" and that same message repeats with each printer in our network, and then it doesn't allow me to print using the add-in. However, I can print normally to HP Go Web, open up Print and Share,  then print it from there. This happens with excel and word. I have Office Suite 2007.

    Hello modameister,
    Sorry you are having issues with this printer and the ePrint add-on.  There are a couple of questions I would like you to answer please.
    1.  What operating system are you using? (XP,VISTA,7,MAC OS X)
    2.  What and how much data are you trying to print?
    3.  Have you tried to copy and paste the data into a different application or tried using the snip it tool?
    4.  Are you receiving any .dll errors (mscms.dll)
    Thanks
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP.

  • Any Function module or BAPIs are available to get scheme name for the inter

    I have internal order no value in table  AUFK-AUFNR ,  and the internal order corresponding Scheme value is available in IMPR-PRNAM . Now I want to inner join both the tables to extract the data , but there is no common field . Is there any Function module or BAPIs are available to get scheme name for the internal orders?

    look at DB-VIEW  "V_IVP_OR".
    Regards,
    Laurent

  • How to get column names for a specific view in the scheme?

    how to get column names for a specific view in the scheme?
    TIA
    Don't have DD on the wall anymore....

    or this?
    SQL> select text from ALL_VIEWS
      2  where VIEW_NAME
      3  ='EMP_VIEW';
    TEXT
    SELECT empno,ename FROM EMP
    WHERE empno=10

  • Why did I get charged again for items I have already purchased?

    Why did I get charged again for items I have already purchased?

    My theory is that because the original appleID wasn't an email, they're making you switch to it when you update to iOS5.  So that creates essentially a new appleID and it isn't recognized as the one that originally made all your purchases.  Sign out of the Store and then sign in using your old ID and it should do the trick.
    The other alternative is to sync your apps rather than reinstalling them....if you can.  Hope the phone service helps.

  • I cant get the names for music on mediasource for my zen to

    I cant seem to get any names for my music on mediasource. I went and did the Gracenote CDDB thing but all that I can seem to get is a a thing that says Socket open failed. Does anybody know what that means and how can I fix it's
    Thanks!

    You can try reregistering the Gracenote DLLs, as described in the Zen FAQ at Nomadness.net.
    Alternati'vely try installing a program that also uses Gracenote to see if that works.

  • Event Receiver to get folder Names from List View Web Part

    Hi,
    We have a requirement i.e.
    On one of the page,there are some folders on the list view web part.
    Now through event receiver i should pick the folder names from list view web part and
    update the same in the list.
    If that names already exists in the list then we should leave without updating,if not we have to add folder name in the list.
    Please share your ideas regarding the same.
    Regards,
    Naga Sudheer M
    Thanks & Regards, Sudheer

    Hello,
    LVWP is just for displaying content of site so you need to associate your event receiver with actual list/library. You can create ItemAdded event receiver to check existing folder and create new if not existing. "sk2014" links are good to start.
    http://sharepoint.stackexchange.com/questions/59788/change-name-in-itemadding-event-receiver-or-create-a-new-item
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • ITunes 11.4.0.18 will not get track names for imported mp3 albums.

    I'm new to Apple (Windows 7 i7 Sandy Bridge processor 16GB ram) and recently got an iPod touch 5g 64GB and I am trying to figure out iTunes.  I have GB's of albums that I have collected over the years in mp3 format.  When I imported them to iTunes via...File>Add Folder to Library...It imported all of my albums, but, almost NONE of the tracks are in order and they are "scattered" for lack of a better word.  Some are with the albums they are supposed to be with, but MOST made their own names and albums.  Getting the tracks with the albums I fixed by doing it manually.  Getting the tracks in order in the albums...HELP.  I tried to "Get Track Names", but iTunes comes back with "iTunes cannot get CD track names for songs that were not imported using iTunes.  To allow iTunes to look for CD track names for this song, import the song again using iTunes."????  I'm assuming that iTunes will only get the track names if they are imported from CD only and not mp3?  If I have to manually enter all of the information in myself....God help me...just leave it unorganized???

    When iTunes imports a CD it records the information used to look up the album in the Gracenotes database. When you add your tracks into a different library that data is no longer available. See Grouping tracks into albums for some tips on organizing iTunes content.
    tt2

  • Getting Folder Name from SPAuditEntry

    Hi,
    Url is in the format of /sites/Nucleus/foldername/filename.docx
    I am able to get the document path,filename using SPAuditEntry as below
    SPList list = web.Lists["testdoclib"];
    dt.Columns.Add("Folder");
    dt.Columns.Add("Document Path");
    dt.Columns.Add("File Name");
    SPAuditQuery spQuery = new SPAuditQuery(site);
    spQuery.RestrictToList(list);
    SPAuditEntryCollection auditCol = site.Audit.GetEntries(spQuery);
    foreach (SPAuditEntry entry in auditCol)
        if (entry.ItemType == SPAuditItemType.Document && entry.Event == SPAuditEventType.View)  
    dr["Document Path"] = entry.DocLocation;
    dr["Folder"] = entry.DocLocation.Substring(entry.DocLocation.LastIndexOf("/Nucleus/") + 1);
    dr["File Name"] = entry.DocLocation.Substring(entry.DocLocation.LastIndexOf("/") + 1);
    dt.Rows.Add(dr);
    But not able to get the foldername exactly.
    So please let me know if there are corrections to get the exact result
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    try these links:
    http://www.sharepointsecurity.com/sharepoint/sharepoint-development/get-friendly-user-name-for-spauditentry-userid/
    http://www.windows-tech.info/6/d6eda88fe3a5572c.php
    Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

  • Which fields to concatenate to get text name at item level in IW32

    The transaction text for IW32 at item level,i.e, text-id is AVOT for transaction IW32. Apart from sy-mandt what are fields that form the text name(text header for items) in transaction IW32. which fields to concatenate to get the text name for eah items in IW32 inorder to pass the text name in the exporting parameter 'name' of READ_TEXT. The text object is AUFK.

    Hi,
    Use the order number to read table AFKO. You will find the routing number (AUFPL) for the order. The operations of the order are in table AFVC (using the routing number). The texts can be found by concatenating CLIENT AUFPL and APLZL.
    Regards,
    John.

  • How do  I get track names for a CD imported into my Itunes?

    I am running itunes 11.1.3 (8).
    I can 't find the command to get the track names for a CD I just imported into my itunes.
    This used to be simple....
    Any suggestions?

    It still is simple, but as always you get the track names before you import the CD.  iTunes has a preference setting so it will always do that or you can re-identify a CD using a menu item (see below).  Once they are imported there is no way in iTunes to get the identification service to work.  There are third party services that work outside of iTunes but for a single CD it is easier to just reimport the whole thing after correctly identifying first.
    How iTunes remembers audio CDs - http://support.apple.com/kb/TA27785
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html - "iTunes Library Extras.itdb contains some Gracenote CDDB information."
    To re-identify an incorrectly identified CD: "Insert the CD and select it in iTunes, then menu Advanced > Get CD track names. It should requery the Gracenote database and let you pick the correct album." - https://discussions.apple.com/message/18901866 - Newer versions in upper right hand corner, Options>Get Track Names

  • Getting status row for item '' activity id '' does not exist

    Hi,
    Need your help.
    Create a custom workflow SAMPRREQ. Its having following processes.
    1. Start Process
    2. Respond Notification.
    3. Function to update Table with the responded value.
    4. End process.
    After lauching the workflow, Notification send to the performer. Open the notification. When approver click the any of the result value (approve, reject, onhold) system giving followign message.
    3101: Status row for item 'SAMPRREQ/20130206161924', activity ID '242956' does not exist.
    I have seen some threads in the forums and bounce the database , purge the item type completly. But, still getting the error.
    Regards/Prasanth

    Sosa,
    When i run the wfstat nothing wrong in the info. unable to find the issue.
    But, i have narrow down the issue. In the function process in my workfow i am calling a custom function called update_approval_status_new.
    In this the value of the respond notification to be updated to a header table of this workflow and insert into events tables.
    When i comment these two dml ( update to header status & insert into events ) there is no error.
    Can any one tells me can i update and insert custom tables in workflow or not. If I want to do this, what is procedure.
    Regards/Prasanth

  • Function avail to get FOLDER NAME?

    Greetings:
    1. Does there exist a Portal function/procedure for geting the current FOLDER NAME or TITLE?
    2. Where is a useful place to browse for available Portal functions & procedures?
    Thank you in advance for any and all guidance.
    Ed in Tampa

    3 ways;
    data:itab_month type standard table of T247
    data: month_name type table of t247 with header line.
    data: mm(2) type n.
    mm = sy-datum+4(2).
    CALL FUNCTION 'MONTH_NAMES_GET'
    TABLES
    MONTH_NAMES = month_name.
    read table month_name index mm.
    write: / month_name-ltx.
    OR
    REPORT ychatest2.
    TABLES : t247.
    DATA : v_mon(2) TYPE n,
    v_date(10) VALUE '04.09.2007',
    v_ltx LIKE t247-ltx,
    v_ktx LIKE t247-ktx.
    SELECT SINGLE ktx
    ltx
    INTO (v_ktx , v_ltx)
    FROM t247
    WHERE spras = sy-langu AND
    mnr EQ v_date+3(2).
    WRITE : v_ktx , v_ltx.
    OR
    Hi,
    use sub srtingoperation, as below.
    MONTH_NAMES_GET cannot be used to spell the month, it is used to retrieve the available month options in a perticular system and their possible representation.
    if you want to spell the month use the FM ' SPELL_AMOUNT'.
    Use sub string operation for this.
    data: c1(2) type c,
    d1 type d value '04.09.2007,
    WORDS LIKE SPELL.
    c1 = d1+3(2).
    call function 'SPELL AMOUNT'
    EXP
    AMOUNT = C1
    LANGUAGE = SY-LANGU
    IMPORTING
    IN_WORDS = WORDS
    WRITE: WORDS-WORD

Maybe you are looking for

  • Imac wont boot from cd, Can anyone help me Please

    Hello, I just bought my first mac from a co-worker. it didnt have a hard drive so i threw a spare one i had in. I tried holding c when booting, and all i get is the little smile face and the ? on a folder. At first when i booted the computer it didnt

  • Why can't I communicate with both of my GPIB devices?

    I have 1 NI PCI GPIB board in my computer I have 2 identical devices (keithley 237) connected one at address 15 one at address 16 and 2 different programs one program to connect with 15 and 1 to connect with 16 after I tell the 1st labview program to

  • Manage Widgets not opening up

    The little (X) in the lower left screen that you use to click on to manage your widgets is not opening up. I have widgets in the folder (library) but the widgets manager is not there. How can it be restored or downloaded from somewhere?

  • Lr White Balance drop down menu

    I was in Rome this weekend snapping photographs in JPEG format. I then changed my camera settings to snap in RAW format whilst trying to capture the Pantheon at night, knowing I would be able to play about with the white balance and exposure in Lr up

  • Lightroom 5 Raw files

    I shoot raw and LR says it does not recognize the files