Results 1 to 2 of 2
  1. #1
    nat
    nat is offline Member
    Join Date
    Dec 2013
    Posts
    56
    Rep Power
    0

    Default Copying files from one folder to another interactively by the user

    Hi,

    Can anybody help me please how to allow the user to select several files from one folder in the JFileChooser and copy them in a subfolder in the same folder, or another folder?

    Thanks
    Last edited by nat; 03-21-2014 at 03:10 AM.

  2. #2
    typedef is offline Member
    Join Date
    Feb 2014
    Posts
    52
    Rep Power
    0

    Default Re: Copying files from one folder to another interactively by the user

    Read the tutorial. You need the File or Files API to manage the files. Your main strategy should be to show the filechooser, obtain two files, folders, or a combination of the two. From here you just make a call to Files.copy(srcFile, destFile, ) <-- options is the third argument.
    How to Use File Choosers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
    File (Java Platform SE 7 )
    Files (Java Platform SE 7 )

Similar Threads

  1. Copying files
    By Scarlet Sphere in forum New To Java
    Replies: 13
    Last Post: 12-15-2011, 04:16 AM
  2. Replies: 0
    Last Post: 11-12-2011, 01:26 PM
  3. Copying large files efficiently
    By bayan in forum New To Java
    Replies: 2
    Last Post: 10-27-2010, 05:01 PM
  4. Copying Files
    By tgns223 in forum New To Java
    Replies: 13
    Last Post: 06-12-2010, 03:15 AM
  5. Creating Folder in JAVA and Copying File
    By fnoman in forum New To Java
    Replies: 8
    Last Post: 10-18-2008, 07:33 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •