Cannot copy folder contents?

Hi All,
I am trying to copy one folder to another location.
When I take one folder and paste it to another folder.
I am able to get the folder name but when i open that folder it is blank.
I would like to know correct method to copy the folder along with its contents to another location.
Below code only copies folder and not its contents.
IInfoObject item = (IInfoObject)infoObjs.get(0);
IInfoObject itemToCopy=infoObjs.copy(item, IInfoObjects.CopyModes.COPY_NEW_OBJECT_NEW_FILES);
itemToCopy.setParentID(Integer.parseInt(destinationfolderID));
newTitle=item.getTitle();
System.out.println("New Title ="+newTitle);
itemToCopy.setTitle(newTitle);
System.out.println("Organize -Before  Saving");
itemToCopy.save();
Thanks in advance.
Praveen.

Hi Ted
Thanks for reply.
As you have mentioned to copy teh folder first,hope this line of my code does that thing
IInfoObject itemToCopy=infoObjs.copy(item,IInfoObjects.CopyModes.COPY_NEW_OBJECT_NEW_FILES);
The next step you mentioned was to copy the contents to that that new folder..so which means looping through the folder hierarchy or by using any classes like IContainer or IFolder ...
But even then if using IContainer class there is no option for setting the children of that folder to the new folder...
I only see the getChildren().
Could you please provide us with a sample code snippets.
Thanks
Praveen.

Similar Messages

  • Apple script to copy folder contents

    I am looking for help to create an apple script, or automator task that will copy the contents of a specified folder and paste them into another specified folder. There will just be a couple of files within this folder, and each time it creates the duplicate I dont want it to erase pervious copies already created within the destination folder, so it will probably need to change the name of the file (....1, ...2, ....3, something like that).

    I tried setting up this automator app
    You have to drop folder A onto the app ignored for it to do it's thing. Dropping folder A
    on to it 3 times in a row gives this in folder B.
    You can experiment with the app to get what you want.  One should be able to create that script as a folder Action so that any file dropped into folder A will automatically get copied to folder B.  I was unable to get that to work.  Maybe someone with more experience with Automator can help in that area.

  • Coping folder contents and sub folders

    So, I'm working on a little practice folder sync project (fun with my mac)...
    ...and I'v gotten hung up a bit because my little copying app doesn't seem to count folders and sub folders (which I suppose makes sense).
    My initial idea was to take just the date of modification and compare it to the last date that the app was run, inorder to only copy changed files. But this seems problematic on a few levels, so...
    So, my two part question is:
    1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.

    >1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    There are two common solutions to this.
    The first is to use the Finder's 'entire contents of...' command to get a list of everything in the folder, including sub-folders, the second is to make your script recursive - that is, it calls itself several times over.
    In the first case it's as simple as:
    tell application "Finder"
    set allItems to entire contents of folder "path:to:source:folder:"
    -- rest of code goes here
    end tell
    This can have problems, though, especially on very large directories since the Finder is not very efficient at building a list of hundreds or thousands of files.
    The recursive path is a little trickier, but you write a handler to process a folder then repeatedly call that handler, like:
    <pre class=command>on run
    set sourceFolder to (choose folder)
    processAFolder(sourceFolder)
    end run
    on processAFolder(theFolder)
    tell application "Finder"
    set allItems to items of folder theFolder as alias list
    repeat with eachItem in allItems
    if class of eachItem is folder then -- we have a subfolder
    processAFolder (eachItem)
    else
    -- code here to compare the file and back it up
    end if
    end repeat
    end tell
    end processAFolder</pre>
    So here you walk through the folder, each time you find a new folder, you walk through that until you're done. The code takes care of keeping track of where you are in the folder hierarchy.
    >2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.
    There's no need to keep a file. Assuming you have two folders you can just walk through one of them checking to see if each item exists in the other, then copy the newer file to the other directory, like:
    <pre class=command>on processAFile(fileName, sourceDir, destDir)
    tell application "Finder"
    -- check if the files exist
    set sourceFileExists to (file fileName of folder sourceDir exists)
    set destFileExists to (file fileName of folder destDir exists)
    -- now comes the logic
    if sourceFileExists and not destFileExsits then
    duplicate file fileName of folder sourceDir to folder destDir
    else if destFileExists and not sourceFileExists then
    -- assuming you want a two-way synch
    duplicate file fileName of folder destDir to folder sourceDir
    else -- both files exist, so check mod dates
    if (modification date of file fileName of folder sourceDir) > (modification date of file fileName of folder destDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    else if (modification date of file fileName of folder destDir) > (modification date of file fileName of folder sourceDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    end if
    end if
    end tell
    end processAFile</pre>
    If you're not planning a two-way synch an even simpler option is to just keep track of the last time the synch was run. Then all you need to do on subsequent runs is ask the Finder for 'every file of folder sourceFolder whose modification date is greater than lastRunDate'.

  • Cannot copy or move folders to Public Folder

    Both admins and users are unable to copy or move folders with and without content to the public folders. When trying to copy or move a folder to the root or existing subfolders in the public folders i get this error message:
    I can however create folders manually, and then copy and move content as i please. 
    Admins are owners from top of root, users are Publishing Authors.
    I though it could be quota issues, and have set a high default quota with powershell. Upon checking in powershell, the quotas are set, but in EAC the new default limits are not showing (alhtough not nearly showing full) and do not get updated either. 
    Currently running Exchange 2013 CU6 on a 2012 R2 server.

    Hi,
    Based on your description, some admins and users can't copy or move public folders.
    Please check the permissions assigned to these affected users and compare with your permissions on public folders.
    If possible, please add the Owner permissions directly to a specific public folder to check if they can copy or move public folders.
    And please check if this issue affects all public folders or onle some of them. 
    Here is a related thread which may help you for your reference.
    https://social.technet.microsoft.com/forums/exchange/en-US/aa164ba8-5b5b-4f61-9b0d-e2cde4656098/public-folder-copy-error-folders-move-ok-but-cannot-copy
    Best regards,
    Belinda Ma
    TechNet Community Support

  • After upgrading to Maverick, when I double click on the attchment I get this message "...could not be saved, because you cannot change the contents of that fold

    After upgrading to Maverick, when I double click on the attachment I get this message "...could not be saved, because you cannot change the contents of that folder. Change the folder properties and try again, or try saving in a different location." It happens for all types of files.
    Any suggestions as how to fix this?
    I'm on a Mac OS X 10.9.3 with Thunderbird 24.5.0

    Thunderbird > preferences (I think on a mac) and under attachments set the folder

  • Firefox crashes whenever i want to install any addon or download any file. Some times i am receiving error while downloading any file like "could not be saved, because you cannot change the contents of that folder"

    I am the user of latest firefox 3.6.6 browser. I am getting problems of frequent crashes whenever i tries to install any addon. The crashes also occures whenever i want to download any file.
    I am also receiving errors while downloading any file like:
    "C:\Users\****\AppData\Local\Temp\******.001.part could not be saved, because you cannot change the contents of that folder.
    Change the folder properties and try again, or try saving in a different location. I already changed it many many times but still the same problem."
    Adobe flash palyer is also giving problems of not responding. I am using updated version of it already. Java is also updated.
    I already uninstalled firefox compeletly and re installed it many many times but still the same problem. I also scanned my computer with avira and malware bytes' Anti malware and got no dection. Please ractify this problem ASAP lest my profession will suffer.
    == Crash ID(s) ==
    b7f518f2-8d86-41ca-8bab-aee632100709; 1d790e10-d8eb-4904-98c9-94bc62100708; f042d319-b9f8-42ed-a8cb-57c7d2100708

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • When firefox trys to auto update, or I manually download the new version, or some but not all downloads off of the web, I get this error message. C:\Users\John\AppData\Local\Temp could not be saved, because you cannot change the contents of that folder.

    First off, when firefox trys to auto update, it fails. It tells me to try and download the new version from mozilla's site. When I try to download the new version I get this: (C:\Users\John\AppData\Local\Temp could not be saved, because you cannot change the contents of that folder.)
    This is the same message I have been getting when I try to download other things off the net. (When I use other browsers to download I dont have this problem)

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • Cannot copy photos from camera roll to a synch folder

    I cannot copy any photo stored in Camera Roll to folder that synch's with my PC.  > "PC Synch Folder"<    I am using iphone 4s and iPad 3.   Happens to both iDevices.
    On the iDevice the "PC Synch Folder" is greyed out when trying to do a copy.   In fact, I cannot even delete that folder from either iDevices.
    For what it's worth, I can create a new folder on either iDevice and copy from Camera Roll to it.  Fine.  But that folder will not talk to the folder that I want to synch with my PC.  Strange?
    The folder "PC Synch Folder" will indeed sych any picture I put in there from the PC side.   However, what is in there, does not show up in Camera Roll.  What I have in Camera roll cannot be transferred into the "PC Synch Folder"   It's like there is a wall between the folders.
    Hence the problem is ...  pictures taken on either iDevices cannot be transferred back to my PC!   I don't want this !
    This seems most odd.  Have I done something dumb and simple?
    /tom

    I use Picasa. You don't have to use iTunes at all. Connect the phone with the USB cable and launch the app of your choice, such as Picasa. Click the "Import" button at the upper left. Your iPhone should appear in the dropdown of choices to import from. You can then import all or some of the photos in the Camera Roll. You should be able to do the same thing with Microsoft Picture Manager or any other photo management program.
    The reason that Elements is the only choice is that's the only one that iPhoto on the phone recognizes albums in.
    You cannot move photos INTO the Camera Roll from your computer; it's a one-way transfer. But you can sync photos to the Photos app on the iPhone. You either use Elements, or just create a folder on your computer for photos to sync, then create a sub-folder for each album you want on your computer. Copy the photos to each album, then go to the Photos tab in iTunes and select the top-level folder. When you sync each sub-folder will become an album on the iPhone.
    However, I consider the photo app on the iPhone rather limited and klunky. Instead I use the app MyPics from the app store. It syncs photos from my Picasa Web albums directly to the phone over the air. I can also create albums in Picasa Web from the phone, and upload images from the Camera Roll directly to Picasa Web.
    Another way to get photos (and other files) to and from the phone is Dropbox and similar cloud-based storage solutions.

  • Cannot copy acrobat pro 9 app folder to applications directory

    have uninstalled acrobat pro 9 because of failure to recognize new scanner.  Now cannot copy app folder from DVD into applications folder.

    Hi Janice,
    What version of Mac OS are you using?
    Adobe does not recommend migrating the software from one disk to the other.
    Please run the setup file for Acrobat and reinstall the software. You might want to delete the existing version of Acrobat installed before reinstalling it.
    Regards,
    Rave

  • The Java load in database SID / hostname has not been configured yet. You cannot run an installation from the System Copy folder with this load

    Dear Gurus,
    We are facing the below issue when performing a homogeneous system copy of NW 7.0 system using backup/restore method for DB6 system.
    The Java load in database <SID>/<hostname> has not been configured yet. You cannot run an installation from the System Copy folder with this load.
    We went through the SAP Note http://service.sap.com/sap/support/notes/2049842, and followed the same but no luck.
    We updated the Kernel to the latest, but still no luck.
    Request for your quick help as we have to complete it by EOD today.
    Thanks a lot in advance.
    Best Regards,
    Anuj

    Hello Ashutosh ,
    Thanks for your reply.
    We have gone followed the below sequence:
    SCS Installation
    Database Instance Installation using backup/restore method
    CI installation. -> getting error, when we provide the Java Components DVD.
    Best Regards,
    Anuj

  • Big Permissions Problem: "You Cannot Change The Contents Of This Folder"

    I installed Tiger some time ago (and need to upgrade now from 10.4.6 to 10.4.9).
    I haven't used it much since some of my software will only run under Panther.
    In any case, I'm using it now and have been having big permissions/user accounts problems.
    I have two users on the computer "robert" and "ra", both with admin privileges (I set up two because I was trying to get around these problems -- I'd be very happy with just one).
    I have 10.4.6 installed on an external HD and boot from that into Tiger (I have Tiger on another external HD as a backup, and my main HD in the iMac has 10.3.9 -- that's what I boot from when I need to run older programs).
    In any case, both "robert" and "ra" have ADMIN privileges. But I get weird ownership problems. For instance, if I am logged in as "ra" and try to play a Realplayer file streaming from the web (in Firefox 1.x), I get the error
    /Users/robert/Desktop/307e6wz7 could not be saved, because you cannot change the contents of that folder.
    I check the ownership of the "Desktop" folder -- read/write for "ra".
    If I right-click I can save the Realplayer file to the desktop.
    Same with other links.
    I've also noticed other ownership problems (blocked folders at finder level) but can't duplicate tonight. Is this an obscure error, or is there something amiss in ownership recognition? Is there some way I can sort all out? Login in as "root" and set all right?
    Thanks
    G4 iMac   Mac OS X (10.4.6)  

    Yes they do. When you installed them you dragged these particular apps to the Applications folder. Doing so automatically attributes the program with the ownership attributes of the account owner who installed them - 'robert.'
    Proper application installers install apps under the system/admin ownership. You can try to fix these apps by changing their permissions:
    Select the app and CTRL-click to open the contextual menu. Choose Show Package Contents from the contextual menu. Select the Contents folder and press COMMAND-I to open the Get Info window. In the Ownership and Permissions section click on the tiny arrow icon to expose the panel. Click on the little lock icon to authenticate. Change permissions as follows:
    Owner = system with Read/Write privileges
    Group = admin with Read/Write privileges
    Other with Read-Only privileges
    Click on the Apply To Enclosed Items button. Close the lock by clicking again on the lock icon.

  • My iPod touch is plugged into PC. My iPod is shown, but when I drag content from iTunes library to it I end up with an error message that says it "Cannot copy item" then "The device has either stopped responding or has been disconnected."  What to do???

    My iPod touch is plugged into PC. My iPod is shown, but when I drag content from iTunes library to it I end up with an error message that says it "Cannot copy item" then "The device has either stopped responding or has been disconnected."  What to do???

    Yes you can drag and drop music to the iPiod if you select Manually Manage Music and Videos in  iTunes.
    DaibhiN wrote:
    You do not drag the music to put it on the iPod, you click into the iPod tab and sync it with your library.
    This article may help: http://support.apple.com/kb/HT1386
    Does that answer your question?

  • Is there a way to set the ACLs on a folder so that users cannot copy a file?

    Hello,
    Is there a way to set the ACLs on a folder so that users cannot copy a file?
    I have a customer that wants to put an employee handbook into a FORMS FOLDER. But he doesn't want users to be able to copy the file into other folders or onto removable media.
    Admittedly, I have never run into this before and my testing hasn't yielded an answer...
    Any Ideas?
    Thanks again,
    Robert

    Use third party software for security management (http://www.wave.com/ ,
    http://www.devicelock.com/ ,
    https://www.lumension.com/, etc) . Standard access rights that come with operating system do not go beyong permission/share schema.
    Rgds
    Milos

  • Oracle R Enterprise installation ERROR: cannot copy dll file

    This is bit strange, I posted this message in 2 forums but surprisingly can't find it anymore!! Anyways, I would appreciate if anyone can help me a bit on this issue:
    I am having trouble installing ORE 1.3 on my windows 7 (home premium, personal notebook) 64 bit. I strictly followed the installation note and made sure all the path variables are defined properly. My R version is 2.15.1. My Windows user is a member of ora_dba group as can be seen below.
    C:\Users\sourabh>net localgroup ora_dba
    Alias name        ora_dba
    Comment         Oracle DBA Group
    Members
    NT AUTHORITY\SYSTEM
    sourabh
    The command completed successfully.Now when I try to install.bat (bare with me as I try to include the whole path as I believe there may be the problem. Note that my oracle and R installation is in H:\ drive, not in C:\. Can that be an issue about some windows permission? I off-course tried many ways, gave the user full permission, but no luck.)
    C:Users\sourabh>H:\ORACLE\OracleREnterprise\ORE\ore-server-win-x86_64-1.3\server\install.bat
    Oracle R Enterprise 1.3 Server Installation.
    Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    Checking R ...................................
    Pass
    Checking R libraries ........................
    Pass
    Checking ORACLE_HOME ...............
    Pass
    Checking ORACLE_SID ..................
    Pass
    Checking sqlplus ...........................
    Pass
    Checking ORE ..............................
    Pass
    Current configuration
      R_HOME            = H:\ORACLE\OracleREnterprise\R\R-2.15.1
      R_LIBS_USER     = H:\ORACLE\Oracle11g\product\11.2.0\dbhome\R\library
      ORACLE_HOME  =  H:\ORACLE\Oracle11g\product\11.2.0\dbhome
      ORACLE_SID      = SINHA
    Do you wish to install ORE? [yes]
    Choosomg RQSIS tablespace
    PERMANENT tablespace to use for RQSYS [SYSAUX]:
      Using default SYSAUX
    TEMPORARY tablespace to use for RQSYS [TEMP]:
      Using default TEMP
      Tablespace summary
      PERMANENT tablespace = SYSAUX
      TEMPORARY tablespace = TEMP
    Installing libraries ..............
    Fail
      ERROR: cannot copy "rqe.dll" to "H:\ORACLE\Oracle11g\product\11.2.0\dbhome\bin"
    C:Users\sourabh>Now here is the default group/user and permissions structures for C:\ and H:\ installation directories on my computer:
    C:\program files :
            Group or user names                                    Permissions
            CREATOR OWNER                                          Special Permissions
            SYSTEM                                                 FULL control
            Administrators (Win7\administrators)                   FULL control               
            Users (Win7\Users)                                     Read & execute, List folder contents, Read
            TrustedInstaller                                       List folder contents, Special Permissions
    H:\%ORACLE_HOME% :
            Group or user names                                    Permissions
            Authenticated Users                                    Special Permissions
            SYSTEM                                                 FULL control
            Administrators (Win7\administrators)                   FULL control                Now noticed that there is no user called sourabh (Win7\Users) or Users (Win7\Users) on H:\, so I created and gave them "Full control" permission before running install script, but still no luck.... Any help please?
    Thanks,
    Sourabh

    Hi all,
    I have finally solved the problem, it seems somehow on my windows home premium I can't run the install script (on H:\ ) from the command line. I manually ran the batch script by double clicking on it, it ran fine and I was finally able to install ORE (server + supported + client) on my laptop. Now the connection -- followed through the manual, created user and granted all the roles. Now that I want to test the connection, I open R console and below are the input and output error message though it seems I can connect to the database:
    R>
    R> library(ORE)
    Loading required package: OREbase
    Attaching package: ‘OREbase’
    The following object(s) are masked from ‘package:base’:
        cbind, data.frame, eval, interaction, order, paste, pmax, pmin, rbind, table
    Loading required package: OREstats
    Loading required package: MASS
    Loading required package: OREgraphics
    Loading required package: OREeda
    Loading required package: OREdm
    Loading required package: lattice
    Loading required package: OREpredict
    Loading required package: ORExml
    R>
    R>
    R>
    R> ore.connect(user = 'scott', sid = 'sinha', host = 'win7', password = 'tiger', port = 1521, all = T)
    Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  :
      ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unable to load DLL
    ORA-06512: at "RQSYS.RQEVALIMPL", line 17
    ORA-06512: at "RQSYS.RQEVALIMPL", line 14
    ORA-06512: at line 4
    R>
    R>
    R> ore.is.connected()
    [1] TRUE
    R> I get the exact same error when I try to use even the ORE user "rquser". Any suggestion how to resolve this error?
    Thanks,
    Sourabh

  • Upgraded to Mavericks not my excel clipboard cannot be emptied and I cannot copy and paste from safari either.

    I upgraded to Mavericks. Now when working in excel I cannot copy a cell to paste. When I try to copy an alert pops up saying 'Cannot empty clipboard'. I hit "OK' then I go to another screen, such as Safari, then excel on dock will bump then I have to keep going back to it to select "OK" again.
    Also, I cannot copy on Safari, to paste an address on google earth, or paste anywhere else for that matter.
    Anyone experiencing same issues?
    I already checked my clipboard in finder and it is empty. Also, I tried right clicking to copy and still did not work that way.
    Thanks. This is very frustrating because I need to use shortcuts and I work fast. I have business to tend to and need everything working. Excel keeps shutting down and restrting as well, very frustrating because I have to constantly save work and hope that it reopens with last edit.
    ANY HELP is GREATLY APPRECIATED!

    Testing in a new User will quickly tell you if the problem is system wide or if it's your User's folder that contains the problem.
    CREATE A NEW USER
    Go to System Preferences --> Create a New User in Accounts. Switch to the New User by logging out/in or use Fast User Switching.
    Do you still see the issue?
        If yes, then the problem is with your base files.
        If no, then the problem is in your User's folder.
    Please download EtreCheck and post the contents here. This will help further troubleshoot your problem.
    http://www.etresoft.com/etrecheck

Maybe you are looking for