Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:11:54+00:00 2026-06-05T15:11:54+00:00

I have a bunch of files in a folder checked out from a repository.

  • 0

I have a bunch of files in a folder checked out from a repository. I have a code which has to copy the files from the folder to another folder. I do the following:

File f = new File(/* path of folder */);
File[] fs = f.listFiles();
for(int i=0; i<fs.length; i++){
        FileChannel in = new FileInputStream(fs[i]).getChannel();
        FileChannel out = new FileOutputStream(/* output directory */ +File.separatorChar+files[i].getName()).getChannel();
        in.transferTo(0, in.size(), out);
}

However, the .svn file within the checked out directory is causing a problem. I get the exception:

java.io.FileNotFoundException: /checked_out_folder/.svn (No such file or directory)
[x]     at java.io.FileInputStream.open(Native Method)
[x]     at java.io.FileInputStream.<init>(FileInputStream.java:120)

Is it because it is a hidden file? What could be the solution for this? Or am I missing something here?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:11:55+00:00Added an answer on June 5, 2026 at 3:11 pm

    I think it is because it is a directory and not a file.

    Directories you have to create by using the mkdir method. Whole directories cannot be copied in java as far as I know.

    For an example on how to copy a directoy, see this blog post.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of source code checked out from a SVN repository, now
I have a bunch of files in a folder which I'd like to copy
I have a bunch of .doc files in a folder which I need to
I have checked out a bunch of java code using subversion 1.6 and then
I have a folder that has a bunch of files such image_hello.png, helloworld.png, wired.png.
I have a bunch of log files which are pure text. Here is an
I have a bunch of HTML files in HTML folder. Those HTML files have
Suppose I have a bunch of files in a folder: foo.test.txt bar.txt ... And
I have a bunch of gzipped files in a folder where each line of
I have a bunch of .java files in a src folder that depend on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.