Copy and Paste in selected folder

Hi All,
I need to select(copy) ".pdf" files and paste into selected folder.
Using Mac.
var file = File.openDialog("Please choose PDF", "PDF:*.pdf");
var destinationFolder = Folder.selectDialog("Select Paste Folder");
Could anyone help on this.
Thanks in advance
Beginner_X

Hi Vandy,
Thanks for your response...
Above  coding is not worked out for moving folders...
But using forum I got below function, it works great
function copyFolder(sourceFolder, destinationFolder) {
    var sourceChildrenArr = sourceFolder.getFiles();
    for (var i = 0; i < sourceChildrenArr.length; i++) {
        var sourceChild = sourceChildrenArr[i];
        var destinationChildStr = destinationFolder.fsName + "/" + sourceChild.name;
        if (sourceChild instanceof File) {
            copyFile(sourceChild, new File(destinationChildStr));
        else {
            copyFolder(sourceChild, new Folder(destinationChildStr));
function copyFile(sourceFile, destinationFile) {
    createFolder(destinationFile.parent);
    sourceFile.copy(destinationFile);
function createFolder(folder) {
    if (folder.parent !== null && !folder.parent.exists) {
        createFolder(folder.parent);
    folder.create();
Any other coding is also appreciatable....
Thanks in advance
Beginner_X

Similar Messages

  • In FF33 why can't I copy and paste (any) selected text/photo, etc.?

    Whether in an email or from a web page or even a URL, I select then try to copy and paste and am unable to do so. Use an iMac with (primarily) Yahoo email, MS Word.
    I just now tried to select troubleshooting info from this page and no go.
    Thanks.

    Some web pages can set the browser to disable the right click. But
    that does not extend to the address bar, or other pages.
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences'''<Enter> in the address bar
    Select '''Advanced > General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Copied and pasted my itunes folder to a new internal drive- can I consolidate the library?

    I ran out of space for my images so I copied and pasted the whole itunes folder over to a new internal hard drive.  I then deleted the itunes folder on the original drive.  I went to preferences in itunes and changed the location of the music folder.
    Unfortunately, the music library is not connecting to that new location, it is only filling with things from icloud.
    I looked up some instructions and now find out that the way to do it is to create a new folder and instead of manually copy and pasting, consolidating the files via itunes.
    What can I do now that I have done it manually?
    Thank you

    This is the process I usually recommend.
    Backup the library with this User Tip.
    Restore the backup to your new computer using the same tool used to back it up.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Keep your backup up-to-date in future.
    If you've done the backup properly, delete any existing empty iTunes library that has already been made then copy in the entire iTunes folder from the external drive into your profile's music folder. Start iTunes. It should "just work" with no need to import anything.
    tt2

  • Mail app:  copy and past in draft folder kills the mail app every time

    Create an email and save it (instead of sending it), the go to the draft folder, copy that draft (command,c) and try to paste it (command v) to create multiple versions of that email and the mail app dies every time. I do this to create multiple copies for mass emails which brings me to problem 2, the Mail app cannot send to multiple email addresses.

    This has been really bothering me. I came up with this solution and have tested it. I hope it works for you too.
    Create your first e-mail
    Save it to your Drafts folder, in the usual way (in whichever account you're going to send from)
    Left-drag this e-mail FROM your drafts folder on to your DESKTOP
    Double click the icon it makes
    When it opens, from the Mail.app menu bar click Message > Copy to > click on the Drafts folder you want your e-mail to be saved in
    The e-mail that you double clicked from the desktop should still be open
    Now use this key-combination alt-⌘-T and you'll copy another version of the same draft e-mail to your drafts folder
    Repeat the key-combination for as many versions of the e-mail you need - you can work at some speed, it keeps up - no crashes. They will all go to your Drafts folder in the same way the Copy/Paste feature used to work
    Once you have as many copies in there as you need, double click each one from your drafts folder, add the recipient address and any customisation and SEND!
    This problem appears in quite a few threads on the Apple forum, so I will cross post.
    I've not seen this solution anywhere else, or anything similar.
    I'm happy for you to share this, once you've tested it, and you can follow on http://twitter.com/philipchapman
    GOOD LUCK!

  • Copy and paste applications folder?

    Hey,
    I used to back up my powerbook to an external drive partition using Disk Utility but niw it throws up an error after a few seconds of copying over, and I can't format the external drive as it has other important stuff on the other partitions. So I've been copying and pasting my home folder ( which works fine ) to this partition.
    What I was wondering was if I copy over my Apps folder too, in the event of my Mac dying and a new one arriving, would I be able to import my Apps folder via copy and paste and have everything sitting like it is now??
    Or does anyone know why disk utility crokes everytime??
    many thanks
    John

    I'm not sure why Disk Utility won't do what you wish, - what is the error it gives you? - but I don't think that using copy and paste will work on your Applications folder.
    The reason is that while some applicaions are self contained, many have references to folders in the /Library or /System/Library (for instance any the required an Admin password to install) as well as to your own Home/Library folder, and any of these can only be re-installed with the supplied installers.
    Instead of this, you could CLONE the hard drive which would make a complete copy of the drive on your external disk. There are several apps which will do this for you.
    In relation to copying and pasting your home folder, have you considered using software that will make incremental back ups (that is, only copy the changed files, which is a lot faster. There are many out there from the very reasonable to the horrendously expensive.
    Regards
    TD

  • [b]HOW TO:[/b]  Copy and Paste THE Filename AND its PATH from Finder

    HOW TO DO THIS: Copy and Paste THE selected Filename AND its entire PATH from Finder to another application as in document footer reference, or document database which has a path field to aid in locating the file later.
    Finder, Spotlight and File Info (can be used to display Path) or using Command F, command I, etc. but user is not allowed to copy the path to clipboard.
    This is rudimentary, yet the word Path, is unknown to Mac Help.
    Message was edited by: jbov

    AJ,
    Isn't it amazing....There is no Command Key for this action? Apple Care was confounded too. And thanx, it'll be a help....
    Jim
    its tedious, but this should work:
    open a terminal window.
    Drag and drop the icon for the file in the terminal
    window.
    This will put the full path including the filename on
    the command line.
    Copy the path from the command line, and paste
    (wherever).
    Close the terminal window.

  • How to copy and paste text from email to a memo pad or browser?

    what is the gesture to highlight and copy and paste a selection of text from an email message to another destination.
    I have a URL that is now showing up as a hyperlink and I need to cut and paste it out of the email. 
    the two finger gesture from the browser doesn't work in the email client. 
    8100, 8900, 9800, and Playbook owner

    I have to agree with bmalmquist.  Need for Speed seems to work great on the Playbook.  I didn't buy the Playbook to play games though.  RIM needs to shift their focus from games to useful and productive apps.  The apps I need to use are either missing very important features, or are just completely missing.  It is somewhat disconcerting to see new apps appear in App World only to discover that the new apps are mostly games.  I'm seeing lots of apps that would help me waste time, but very few that will actually help me be more productive.

  • Intermittent copy and paste issues...

    I've been running into problems with copying from MS Word (Office 2004) into Mail. What happens is I can copy and paste from word once, then after that, no matter how many times I try to copy and paste other selections from word, I can only re-paste the original selection.
    Closing and restarting Mail doesn't seem to help, neither does closing and restarting word.
    It seems that using Onyx to clear the cache helps, but the problem sometimes comes back... any ideas?
    B&W G4/600 T-1202Combo; PB G4/1.33/15" Combo; iMac G4/15" Combo   Mac OS X (10.4.8)   160GB FW HD

    How are you copying/pasting? I have just tried to reproduce the problem, using menu items (Edit/Copy in Word, Edit/Paste in Mail) and couldn't. I copied 5 separate sections of text, all from the same document.
    AK

  • Copy and Paste Multi Layers

    I have a picture with several layers. I doubled the width of the canvas size to fit two up for printing.
    How do I copy all the layers to paste an exact duplicate with all the layers in tact without having to flatten the image?
    Thanks

    Thanks...That's a neat trick, but not quite what I need to do.
    I need to select each layer as a group then duplicate them to create the same picture side by side or drag and drop all the duplicated layers intact on the extended canvas. I cannot use the picture package because the size is not a usual format.
    In short, we have Employee badges that are printed through a 4 x 7 printer, to save paper we want to print the badges two up, but the layout template with its numerous layers is only one up.
    It would be really easy just to flatten the image, then duplicate the layer, but each badge has text layers that change with each employee's name, number etc., so all the layers have to be editable when there are two up.
    The issue is how can separate layers be copied and pasted or selected and dragged and dropped as a group in Photoshop and still retain the editable layers?

  • Copy and paste on Enterprise Manager running on Xwindows

    Dear All
    It might be a simpe question if known the answer.
    Is it possible to do the "copy" and "paste" of
    selected text on Enterprise Manager running on Xwindows? For example, Is it possible to copy a view or procedure code shown on Enterprise Manager and paste it onto another window? I used to run OEM on PCs and could do so
    by using Ctrl+C and Ctrl+v; but couldn't do the same on OEM running on Solaris using xterm: Hummingbird (Vista eXceed).
    Regards,
    Zhuang

    Hi princess,
    Check the Edit menu, where you'll find Cut, Copy and Paste, as well as variations of Paste in some applications. Where there is a keystroke combination to do the same thing, you will find it listed in the menu beside the menu command, Here's my Edit menu in Pages:
    Yours will be missing the starred key stroke set by Paste and Match Style. This is a custom one, taking advantage of OS X permitting the creating of keystroke combinations for top level menu items without one assigned.
    One handy set to memorize is the Z X C V series. With the command key, these are Oops!, Cut, Copy and Paste.
    If you've used keyboard shortcuts in Windows, you will find that many of the Mac ones are the same, but use the command key where MS uses the control (ctrl) key.
    Regards,
    Barry
    PS: A minor rewording on Niels instructions for using the modifier keys. When I gave instructions essentially the same as his to my grade four and five students, I found many of them stabbed at the two (or more) keys, trying to press both at exactly the same time, an almost impossible task. When I revised the instructions to those below, most of the errors disappeared.
    command-C: This means 'press and hold the command key, tap and release the C key, then release the command key.
    shift-command-A: Press and hold the shift and command keys, tap and release the A key, then release the two modifier keys.
    In general: Press the modifier keys (shift, command, option, control—whichever is called for—in any order, holding it/them down, then press/tap the action key (usually a letter), then release the action key, then release the modifier keys.
    B

  • Why can't I copy and paste the music from my iPhone on iTunes 11 to a folder in my Music Library?

    Why can't I copy and paste the music from my iPhone on iTunes 11 to a folder in my Music Library? I want to have a copy of the music on iTunes so when I update to a newer version of iOS I don't lose my music. And no I didn't buy this music off iTunes and neither will I use iTunes Match.

    There has never been a function to copy anything from an iPhone and paste it to a computer.
    All of your media should be in iTunes already.
    If it is not and was purchased from iTunes, right click on the device and select Transfer Purchases.
    If the media is not in iTunes and was not purchased from iTunes, how did you get it on the device in the first place?

  • Automation Folder, Automation Event Editor, Automation copy and paste help

    Hello. I have been reading the copy and paste automation threads and I still have a few questions. First, thanks to whoever posted the option double-click on track background to select all visible automation for that track. Also, thanks to whoever posted the option click an automation node to select all following visible automation nodes.
    Now, how do you select the middle 10 automation nodes in a track with 30 nodes? Many people have stated that the answer is a rubberband selection. This does not work for me. When I click and drag on the track background using the pointer Logic thinks I'm trying to create a new automation node. When I click and drag on the track background using the marquee tool Logic selects the audio and automation data. Then it only pastes the audio only even though I have "move automation with regions" set to ask.
    Some people have recommended the automation folder. When I open the Automation Event Editor and click on the tiny rectangle in the upper left corner I just get a short list of the automation data. Is this right? If so, how do I select the data I want and paste it to another track? Because when I select the automation data for a track and copy nothing seems to happen when I paste.
    Any automation gurus out there willing to help? Please and thank you in advance.

    Hello Pete. Thanks again. It's odd that something so potentially useful is so hard to get to. I guess that is what people are referring to when they say that Logic has a steep learning curve. Is there another way to get to the automation folder? I think that it should have it's own item in the windows menu instead of sharing it with the arrange window and being contextual.
    The copy and paste in the automation folder (automation arrange seems more appropriate as I cannot figure where the folder is) does not work as I expected. For instance, when I select volume automation from a track then option drag it to the pan automation of another, it still copies it to the volume automation. I then have to command click volume then switch to pan and select copy and convert, which makes it MIDI, which you say is not recommended. Will you tell me why TBA (and I assume RBA) is preferred over MIDI based automation? What is the difference exactly? Thank you so much for your assistance.

  • HT201269 itunes cannot see my iphone backup.  I have a backup of the backup on an external HD, but even tech support cannot figure this one out.  I copy and paste backups into the correct folder but itunes still does not see it.  All I need are my contact

    Sorry for short novel I am writing.  I just wanted to cover as much backround as possible.
    So, here it goes.  I backed up my iphone 4 after renting a movie.  The movie only played the starting credits before I was called on for daddy duty.  A few days later the movie would not play, so I restored my phone from my backup.  The movie would still would not play so itunes support refunded my purchase and ended my viewing privileges for that rental after verifying that I had not viewed the movie.  I then had a problem with my contacts showing up twice in the contacts list after the restore.  So I attempted another restore.  All was well at this point.  I then started having trouble with my pc and decided to copy the internal drive to an external source.  A week later I had a system failure and did a factory restore on my computer.  I re-installed itunes and tried to copy and paste the old backup into the new itunes.  Now itunes just flat out does not see the backup file (I failed to mention that I did a factory reset on the iphone after the last backup, hopping to start fresh).  Tech support had me uninstall and re-install itunes and then copy and paste the old backup into the newly installed itunes with no luck.  The files are all there, but itunes just doesn't see them (itunes says the device has not been backed up to the cloud or to the local machine).  We then tried backing up the factory restored iphone and replacing that restore file with one of my old backups on the external drive.  Ok, this is where it gets weird.  We replaced the guts of the folder but left the folder itself so itunes would continue to recognize the new backup folder with the old files.  Whoohoo, itunes now see's a backup folder full of old files, or so we thought.  The new files were deleted using shift delete so they would be gone for good and not mix with any files or folders.  When I restore my phone, it restores the files that were deleted from the restore file (pause here for a moment and imagine the stupid look on the face of tech support and I while we silently wonder how files that were permanently deleted were restored).  This left tech support and I both scratching our heads.  My service issue was escalated to the next level.  I waited for the phone call the next day that was scheduled at 10am to my wife's phone, but the call never came through.  As usual, apple disappoints again.  I just bought an iphone 5s and still have the iphone 4, and am looking for a solution to retrieve my contacts and restore to the 4 or 5s.  I am guessing that files in other folders must be associated with the iphone backup in order for itunes to retrieve the files.  Any ideas or support in retrieving my contacts would be greatly appreciated. 

    Sorry for short novel I am writing.  I just wanted to cover as much backround as possible.
    So, here it goes.  I backed up my iphone 4 after renting a movie.  The movie only played the starting credits before I was called on for daddy duty.  A few days later the movie would not play, so I restored my phone from my backup.  The movie would still would not play so itunes support refunded my purchase and ended my viewing privileges for that rental after verifying that I had not viewed the movie.  I then had a problem with my contacts showing up twice in the contacts list after the restore.  So I attempted another restore.  All was well at this point.  I then started having trouble with my pc and decided to copy the internal drive to an external source.  A week later I had a system failure and did a factory restore on my computer.  I re-installed itunes and tried to copy and paste the old backup into the new itunes.  Now itunes just flat out does not see the backup file (I failed to mention that I did a factory reset on the iphone after the last backup, hopping to start fresh).  Tech support had me uninstall and re-install itunes and then copy and paste the old backup into the newly installed itunes with no luck.  The files are all there, but itunes just doesn't see them (itunes says the device has not been backed up to the cloud or to the local machine).  We then tried backing up the factory restored iphone and replacing that restore file with one of my old backups on the external drive.  Ok, this is where it gets weird.  We replaced the guts of the folder but left the folder itself so itunes would continue to recognize the new backup folder with the old files.  Whoohoo, itunes now see's a backup folder full of old files, or so we thought.  The new files were deleted using shift delete so they would be gone for good and not mix with any files or folders.  When I restore my phone, it restores the files that were deleted from the restore file (pause here for a moment and imagine the stupid look on the face of tech support and I while we silently wonder how files that were permanently deleted were restored).  This left tech support and I both scratching our heads.  My service issue was escalated to the next level.  I waited for the phone call the next day that was scheduled at 10am to my wife's phone, but the call never came through.  As usual, apple disappoints again.  I just bought an iphone 5s and still have the iphone 4, and am looking for a solution to retrieve my contacts and restore to the 4 or 5s.  I am guessing that files in other folders must be associated with the iphone backup in order for itunes to retrieve the files.  Any ideas or support in retrieving my contacts would be greatly appreciated. 

  • Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?

    Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?  The cut and paste function is not available and there's no "move to" function.  Am I missing something?  It was so easy with Windows.

    Drag the files, or press Option when pasting them; this accesses the Move To function.
    (124070)

  • I want to take a voice memo off my iPhone, put it into iTunes Library and convert it to an .mp3.  How do I get the voice memos from my phone?  I can't seem to move them out of the Devices folder, no matter how much I try to copy and paste or drag and drop

    I want to take a voice memo off my iPhone, turn it into and .mp3, and email it.  My iPhone shows up under "Devices" in my iTunes but doesn't allow me to move the voice memo files I see sitting there into my Library no matter how much copying and pasting or dragging and dropping I try to do. 
    Also, I need to convert the file to an .mp3. 
    How come no voice memo files show up when I go into my iPhone via My Computer?  All it shows are the videos and pictures in the DCIM folder, but not the voice memos.  Is there another way to access the voice memos other than through iTunes? 

    Email it to yourself, then save the file and then see if you can convert it to MP3.

Maybe you are looking for