Jump to content

Please Help, how to locate a new folder in a given directory

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
uddgire

uddgire

    Newbie

  • Members
  • Pip
  • 2 posts
Please Help

if I have dir sturcute like e:\songs\song1, song2

song1, song2 are the folders under songs folder everyday a new folder will be created.

I want to copy the newest one.

Please help how to locate the new one and copy it to any of the other directory.

Uday:(

#2
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts
List all files/directories by date. Get the first result. Then you will need to create your copied directory and copy all of the files in your result to the new directory.

#3
uddgire

uddgire

    Newbie

  • Members
  • Pip
  • 2 posts
Please,

if you don't mind could you give me the piece of code. I'm a biggiener in java

a great help

Thanks in advance

#4
hoser2001

hoser2001

    Programmer

  • Members
  • PipPipPipPip
  • 173 posts
You may be a begginer at java, but a quick couple of well thought google searches could easily give you the information you are looking for.