Get folder Item using folder Path

Hi,,
I know the folder path = /globalsite/F1/Lib1
How to get the Item object of this folder? can you please post code for this.

http://download-west.oracle.com/docs/cd/B32119_01/doc/contentdb.1012/b31408/oracle/ifs/fdk/FileManager.html#resolvePath_java_lang_String__oracle_ifs_fdk_AttributeRequest___
String path = "/globalsite/F1/Lib1";
FileManager fm = ...
AttributeRequest[] requestedAttributes = null;
Item folder = fm.resolvePath(path, requestedAttributes);
System.out.println(folder.getName());

Similar Messages

  • Get list items using spservices for sharepoint 2013

    Hi,
    I have a requirement like below.
    I have 2 sharepoint custom list with some columns.
    List1:listA
    List2:listB
    Now when i open the listB new item form i want some of the field values from listA should auto populate in Textboxes of listB new form.
    Is there any ways to implement this?
    Regards,
    Poovi

    Hi Poovi,
    You can achieve this using jQuery to get the SharePoint list items. Refer the below articles. It has explained how to get list items using jQuery and auto populate a text-box from a list item as a source.
    You can put this code in list forms through SharePoint Designer. The articles explain about auto populating text box of web part but similarly you can implement it for list form, because nevertheless the text boxes are same.
    http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2010-jquery-autocomplete-textbox-containing-list/
    http://tomvangaever.be/blogv2/2011/07/sharepoint-2010-autocomplete-with-list-items/
    Please remember to click 'Mark as Answer' if the reply answers your query or 'Upvote' if it helps you.

  • CAML Query to get specific item in folder based on dropdown value using Javascript client object model

    Hi,
    I am using the Javascript Client object model.
    I have a custom list and a custom document library.
    Custom list contains 2 columns - dlName , dlValue
    The document library contains 2 folders - "folder1" ,  "folder2" and contains some images.
    The image name starts with the "dlValue" available in the custom list
    I am using a visual webpart and using javascript client object model.
    I am trying to achieve the below functionality:
    1) Load a dropdown with the custom list.
    2) set the image based on the value in dropdown.
    I have achieved the first option, I have set the dropdown, but not sure how to query the folder and set the image.
    Below is the code i have used so far:
    //In Visual webpart
    <select id="ddlTest" >
    </select>
    <br/>
    <div id="PreviewLayer">
    <img id="imgPlaceHolder" runat="server" alt="Image" title="imgPlaceHolder" src=" " />
    </div>
    // In Javascript file
    function RenderHtmlOnSuccess() {
    var ddlTest = this.document.getElementById("ddlTest");
    ddlTest.options.length = 0;
    var enumerator = this.customListItems.getEnumerator();
    while (enumerator.moveNext()) {
    var currentItem = enumerator.get_current();
    var dropdownValue = currentItem.get_item("dlValue");
    ddlTest.options[ddlTest.options.length] = new Option(currentItem.get_item("dlName"), dropdownValue);
    setImage(dropdownValue); // Not sure how to query the folder and set the image based on value.
    // Also if dropdown value is changed, corresponding image should be shown
    How to query the folder and based on dropdown value, show the image? Also, how to handle the dropdown value change?
    Thanks

    Hi,
    Here are two links for your reference:
    Example of how to Get Files from a Folder using Ecmascript \ Javascript client object model in SharePoint 2010
    http://sharepointmantra.wordpress.com/2013/10/19/example-of-how-to-get-files-from-a-folder-using-ecmascript-javascript-client-object-model-in-sharepoint-2010/
    SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively
    http://sharepoint.stackexchange.com/questions/70185/sp2010-jsom-client-object-model-how-to-get-all-documents-in-libraries-including
    In SharePoint 2013, we can also use REST API to achieve it.
    http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Remote Execution of a script with Get-Child Item cannot find path

    Hello!
    I have been tackling this problem for a few days now and I just can't find the answer.
    I want to execute scripts remotely in parallel so that each of remote machine will run the script with their own resources.
    Below is just the simple script in the local machine server1
    $Folder = \\server1\folder\subfolder
    GCI $folder
    It works fine it I call that through my client with this I am using in my client
    invoke-command -computername server -scriptblock {powershell.exe C:\filepath\script.ps1}
    But if I change the script inside to look at another machine server 2 and do
    $folder = \\server2\folder\subfolder
    It generates an error that it cannot find that path when trying to call GCI remotely. Note that it still works if the script is run locally.
    I did some research and I see about the double-hop using credssp but I just can't get it to work.
    Any help would be appreciated.

    Each system that you're remoting into (or calling Invoke-Command against) will need to have the WSManCredSSP server role enabled. You can do this through group policy, or you can do it on a per-machine basis. Here's what you would run on a computer if you
    want to only enable it on certain computers (you should be able to run this remotely):
    Enable-WSManCredSSP -Role Server
    The system that you're running everything from will be the CredSSP client. You'll need to run this from it:
    Enable-WSManCredSSP -Role Client -DelegateComputer *.yourdomain.com
    You'll need to change the 'yourdomain.com' to your domain name (or, you could simply put a * for the delegate computer, just be aware that this will allow your computer to pass credentials along to any computer when you tell a cmdlet to use CredSSP authentication).
    Now, to use Invoke-Command, do this:
    $cred = Get-Credential
    Invoke-Command -computername server.yourdomain.com -scriptblock {"Commands go here"} -Authentication CredSSP -Credential $cred
    Notice that the -ComputerName parameter is using a fully qualified domain name. If your -DelegateComputer parameter above used a domain name, you'll have to have the FQDN here.
    Let me know if that works for you. If you want more information, you can check out the Enable-WSManCredSSP and Disable-WSManCredSSP help topics.
    Hi Rohn,
    I tried doing your instruction but it gives me this error
    Connecting to remote server failed with the following error message : The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
    After enabling the client and server with the wsmancredssp
    Here is the command I executed that produced the error
    invoke-command -computername server01.domain01 -scriptblock {get-process} -authentication credssp -credential $cred.
    Thank you very much for all the help.

  • Getting an object using madataService.getItem()

    i can't get an item using
    maDataService.getItem({itemId:valueId})
    i'm using Flex and Hibernate ,i can get collection using
    maDataService.fill() but i don't know what's wrong with getItem().
    what can be wrong ?
    thx

    userList is a collection of Strings, yes?
    <c:set var="user" scope="session">${userList[2]}</c:set>This sets user equal to a member of that list, a string.
    first name: <c:out value="${user.firstName}"/>You're calling user.firstName - there is no firstName member of string...
    If you want to send a bunch of strings to your view and do the same thing with all of them, put them in a list and iterate over them.
    If you want to send data on a bunch of users and do the same thing with each group of information, I'd recommend creating a class to represent the data for each user, sending a list of those to your view, and iterating over them.
    If you just want to send firstName, lastName, middleName, anotherName to the view and do different things with each of them, don't pack them in a list - just send them as standalone strings and do what you will.
    Hope this helps!
    - Kyle

  • Permissions on /Applications folder after using copy items command in ARD

    Hello!
    I've used ARD to copy Applications on client machines. Copying works fine, but I've discovered permissions are wrong even I checked the Set item ownership to: Inherit from destination folder.
    For example I copied the Google's Adnroid SDK bundle to client machines:
    drwxr-x---   4 admin  admin    136 20 Mar 00:48 adt-bundle-mac-x86_64-20130219
    So, no others have no access at all to the folder. I tried to fix it using the Get Info in Finder, but now the application won't even launch on standard user privileges - this may be caused by Gatekeeper.
    How do I give the correct access rights?
    I assume using the Get Info on Applications folder to Apply to enclosed items is not a good idea?

    Hi Lisa!
    You must be very specific with your paths: users/teachers/sites does not equal /Users/teachers/sites does not equal /Users/teachers/Sites. Pay attention to capitalization and prefex your paths with a slash to specify the startup disk.
    If you must specify a path with a space in the name then escape characters won't be necessary. You can simply use _*/Applications/Folder with spaces in name*_.
    Hope this helps!
    bill

  • Trying to remove an old version of I Tunes and keep getting the message "The folder path I Tunes contains an invalid character' . It won't let me go any further, have tried deleting/repairing the program but keep getting the same message?

    trying to remove an old version of I tunes, but keep getting the message 'The folder path I Tunes contains an invalid character'
    It won't let me go any further, have tried deleting/repairing but get the same message and am blocked from continuing?

    Hi Barbara,
    I had a similar problem recently and using the "more like this" feature I discovered an answer. To a problem posed by Holo7,  who like myself was a newbie on this platform,  b noir proposed a solution to Holo7's problem that also worked with my problem. It involves downloading a version of MS Windows Instal Cleanup and using it to completely remove all traces of the old version.
    If you look at my problem (follow OldGit66) and the link to Holo7's problem then you will find b noir's answer which I think may help you. I am new around here so you might want to wait for one of the higher status correspondents.
    Regards
    John

  • Unable to FTP to folder using absolute path

    I'm unable to FTP to a folder on the server that I have permission to if I use the absolute path to the file instead of a relative path. I can't use "/var/www/", but going to the same folder through "../../var/www/" works. However, I think the latter may be causing some other issues around .htacess rewrite and php detection (false warnings after export about php not supported, and .htaccess file not written), but I'm unable to test because I can't get to the right folder without the "../../".

    Hi Andrew, knowing you're in the Prerelease Program, can you give the current Beta build a try and let us know on the prerelease forum whether or not you still encounter this issue? Thanks.

  • On 10.4.11 Mac Mail I get this: Mail cannot update your mailboxes because your home directory is full. You must free up space in your home folder before using Mail. Delete unnedded documents or move documents to another volume. I can't open mail.

    On 10.4.11 iMac Mac Mail I get this message: "Mail cannot update your mailboxes because your home directory is full. You must free up space in your home folder before using Mail. Delete unneeded documents or move documents to another volume." I can't open mail to do this. I have reinstalled software but no effect. How do I get into Mail to delete?

    Found this on the "more like this" Worked like a charm!
    With the Mail.app quit and using the Finder, go to Home > Library > Mail. Copy the Mail folder and place the copy on the Desktop for backup purposes.
    Go to Home > Library > Mail > Envelope Index. Move the Envelope Index file to the Desktop.
    Launch Mail and you will be prompted to import mailboxes. Select OK and allow the import process to complete.
    After confirming all mailboxes were successfully imported and available, you can delete the copy of the Mail folder and old Envelope Index file from the Desktop and this should resolve the problem.

  • I have produced a number of DVD on my iMac. They are stored in a folder called Burn Folder. I want to get them into iTunes so I can play them on Apple TV. I have tried to convert them to MP4s using Handbrake but Handbrake does not recognize these files.

    I have produced a number of DVD on my iMac. They are stored in a folder called Burn Folder. I want to get them into iTunes so I can play them on Apple TV. I have tried to convert them to MP4s using Handbrake but Handbrake does not recognize these files. I am stumped.

    If you have the original movie files, you'd be much better converting those, otherwise try MPEGstreamclip.

  • I have been using the apple IPad camera connection kit and my photos can be viewed in the events... But the all imported folder is no longer there and the last import folder is empty. Is there any way to resolve this ang get my all imported folder back?

    I have been using the apple IPad camera connection kit and my photos can be viewed in the events... But the all imported folder is no longer there and the last import folder is empty. Is there any way to resolve this and get my all imported folder back? as well as get my last import functioning normally?

    Please please help me, if you know how.

  • Is there a way to get an apple mail folder exported to outlook mail folder structure?  I'm using Gmail on my IMAC and have a PC for work.  Want to share folder structure between systems.

    Is there a way to get an apple mail folder exported to outlook mail folder structure?  I'm using Gmail on my IMAC and have a PC for work.  Want to share folder structure between systems.

    Use following steps to import apple mail to outlook:     
    Choose Mailbox->Export Mailbox, or choose Export Mailbox from the Action pop-up menu
    Choose a folder or create a new folder where you want to store the exported mailbox.
    Outlook for Mac: Choose File->Import Mailboxes. Select the mail application you want to import messages from.
    If it does not work then you should use third party apple mail to pst applications. You can easily search in Google about these applications.

  • Get-Item: Cannot find path ' ' because it does not exist. While running Powershell script.

    I am trying to run a PowerShell script to upload files into a SharePoint site in an Azure environment...the script works fine on my local machine, but every time I run it in Azure (remotely), I get errors. Here is what my simple script looks like...
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    Write-Host "Loading Sharepoint Module "
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    Add-PSSnapin -Name Microsoft.SharePoint.PowerShell
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell) -eq $null )
    Write-Host "Failed to load sharepoint snap-in. Could not proceed further, Aborting ..."
    Exit
    #Script settings
    $webUrl = "http://sampleWebUrl"
    $docLibraryName = "My Documents"
    $docLibraryUrlName = "My%20Documents"
    $localFolderPath = get-childitem "C:\Upload\Test Upload\My Documents\" -recurse
    $contentType = "ContenttType1"
    #Open web and library
    $web = Get-SPWeb $webUrl
    write-host "Web:" $web
    $docLibrary = $web.Lists[$docLibraryName]
    write-host "docLibrary:" $docLibrary
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    write-host "files:" $files
    If ($contentType = "ContenttType1")
    #Open file
    $fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
    # Gather the file name
    $FileName = $File.Name
    #remove file extension
    $NewName = [IO.Path]::GetFileNameWithoutExtension($FileName)
    #split the file name by the "-" character
    $FileNameArray = $NewName.split("_")
    $check = $FileNameArray.Length
    #Add file
    $folder = $web.getfolder($docLibrary.rootFolder.URL)
    write-host "Copying file " $file.Name " to " $folder.ServerRelativeUrl "..."
    $spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    write-host "Success"
    write-host "SP File:" $spFile
    write-host "SP Item" $spItem
    #populate columns
    $spItem["Column1"] = $FileNameArray[0]
    $spItem["Column2"] = $FileNameArray[1]
    $spItem.Update()
    $fileStream.Close();
    Again, I can run this on my local machine and it works just fine, but when I attempt to run it on the Azure environment I get this error...
    Get-Item : Cannot find path 'C:\powershellscripts\12653_B7045.PDF' because it does not exist.
    At C:\PowerShellScripts\Upload-FilesIntoSharePointTester.ps1:32 char:42
    +     $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (C:\powershellscripts\12653_B7045.PDF:String) [Get-Item], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
    What strikes me first is the fact that the file its looking for is in the "C:\Upload\Test Upload\My Documents\" directory, but the error keeps saying "C:\powershellscripts\" which is where my script resides and not the files I want to
    upload into SharePoint. When I step through the code, all the variables are holding the correct values. The $localFolderPath shows the name of files that I am attempting to upload, so it recognizes them. But once I step through this particular line of code,
    the error occurs...
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    Is this an error caused because I am remoting into the Azure environment? Has anyone dealt with this issue before? I would really appreciate the help. Thanks
    Update: quick thing I noticed is that these two lines of code are returning null values. Again, is this handled differently in Azure or remotely? I ask cause this is the way I know how to do this, locally.
    $docLibrary = $web.Lists[$docLibraryName]
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()

    "...square brackets are wildcard characters in Windows PowerShell..."
    When you use cd without a parameter it uses the -Path parameter. In this case you'll have to escape the square brackets so they are not considered wildcards. Each of the commands in the first example does the exact same thing.
    cd 'Learn PowerShell `[Do Whatever`]'
    cd -Path 'Learn PowerShell `[Do Whatever`]'
    cd (or Set-Location) also has a literal path parameter (-LiteralPath) that does not require using an escape character (`) before each of the brackets. Hope this helps.
    cd -LiteralPath 'Learn PowerShell [Do Whatever]'

  • Issue using Get-Child-Item

    Have a function that will scan (grep) files in a folder with a certain extension.  For some reason, Get-Child-Item always returns empty / 0 files on my folder even though you can look at the folder and see files of the specified extension (*.config).
     Suspect either I am doing something wrong or permissions are somehow getting in the way.  How do you properly use Get-ChildItem
    in this context?
    function scan-Files
    param(
    [parameter(mandatory=$True)]
    [string]$folder,
    [parameter(mandatory=$True)]
    [string]$filePattern,
    [parameter(mandatory=$False)]
    [bool]$recurse = $False
    Write-Host "Folder = $folder"
    Write-Host "FilePattern = $filePattern"
    $files = Get-ChildItem -Include $filePattern -Path $folder
    #always empty for some reason
    if ($files)
    Write-Host "File count = $($files.Length)"
    }...#Invoke our function$folder = "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\"
    $filePattern = "*.config"         
    #scan-Files -folder $folder -filePattern $filePattern -recurse:$true
    scan-Files -folder $folder -filePattern $filePattern

    The Gods of the computer demand it.  Without it you are only enumerating a folder item.  With it you are enumerating the contents of the folder.  Include only works on files that have been selected.
    Example:
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\*.txt' -include *.config
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\*.c*' -include *.config
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer' -filter *.config
    Try all to see how they work.
    \_(ツ)_/

  • Find date/time when item added item in folder?

    Hey guys,
    I was wondering if there was any Automator Action out there that allows you filter finder items by date "added" to a folder.
    Please don't confuse with the date of the actual item. I am talking about if there is anyway to be able to detect and find when an item was added into a folder.
    Thanks. I hope there is something out there. If not then I hope that there is some sort of applescript that can do this. 
    Please help.
    Phil

    I'm not aware of an Automator action, but starting in OS X 10.7 Lion a Spotlight metadata attribute named kMDItemDateAdded was added that contains the ISO date/time an item was added.  If the item has been moved recently enough to have the attribute (and assuming that Spotlight is indexing the containing folder), there are a couple of utilities you could use.
    The mdfind shell utility won't be quite like filtering, but by limiting the find search to a particular folder and using the appropriate query, you can get a list of items - for example, the following will list items added to the Downloads folder in the last week:
    do shell script "mdfind -onlyin ~/Downloads 'kMDItemDateAdded >= $time.today(-7)' "
    The mdls shell utility can be used if you are just wanting to get the value of a particular metadata attribute from an item, for example:
    set theFile to quoted form of POSIX path of (choose file)
    do shell script "mdls -name kMDItemDateAdded -raw " & theFile

Maybe you are looking for