Hi,
How can i copy the folder from one place to another place..
Including its subfolders and files....
Using java code...
please help me...
Printable View
Hi,
How can i copy the folder from one place to another place..
Including its subfolders and files....
Using java code...
please help me...
Take a look at File Class... there is a mkdir() method there... have some experiments on it....
About copying files, also have a look at FileChannel Class.... it is more safer to implement....
regards,
sukatoa
how do i make folder backup in jave by copying each hour only the changes occured on the folder or subfolder(s),and by folder cloning
You may persist/save a log file with a data that represents the exact length/size of those files inside the folders/subfolders.
Implementing it with thread is safe. you may use sleep(long hour) method to make the thread fall a sleep every hour. After every interval, check the files inside those folders if their size have been changed by comparing them with the data inside that log file.
If yes, then do the copy....
Another dirt way is executing an operating system command. Of course, it means you have to consider all your target operating systems.
Ferran