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 4267550
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:54:53+00:00 2026-05-21T06:54:53+00:00

Sorry, this question might sound silly, but I need some help! My project is

  • 0

Sorry, this question might sound silly, but I need some help!

My project is to open a directory and list all the files. These are csv files. Each file is opened and the contents are loaded into the table in a mysql database.

So I have done the above steps, and my java code works fine. For instance, I have 3 files in the directory. When I run the project, the values in each of the 3 files are loaded into the mysql table.

But when I run the program again and check the database using Select statement, it shows me the repeated data and hence the values of 6 files are loaded. When I run it again, the database shows 9 files. But I dont want the files to be added again.

So can anyone please tell me about how to achieve this without the need to delete the already added files from the directory.

Thanks in advance

  • 1 1 Answer
  • 1 View
  • 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-05-21T06:54:54+00:00Added an answer on May 21, 2026 at 6:54 am

    Have a Unique file identifier in DB and in physical file also.

    Check for this if it exist skip else perform DB operation

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

Sidebar

Related Questions

Sorry if this question sounds a little silly, but I am not sure what
I know this question might sound quite stupid, but I've tried my best and
Sorry this might be a simple question, but I could not figure it out.
I am sorry about how simple this question might be, but I cannot find
Hey, this question might sound totally idiotic so I am sorry. I am a
sorry, I know this question might be too common, but I really couldn't figure
Ok sorry this might seem like a dumb question but I cannot figure this
Sorry if this question is a bit open ended, but I'm pretty new to
First of all, sorry if this might be a stupid question. I'm very new
Sorry, this might be a basic/stupid/noob question - I am just trying to tweak

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.