



I’ve wrote a simple txt file copy class that copies the contents of one txt file to another location because I noticed that a few people were looking for a way to copy textfiles from one location to another so I wrote this class to handle this. Have fun with it. If you have any comments or suggestions to improve this application let me know by makeing a comment!
Here’s the main code to test the class:
/*————————————————————————–
//Author List:
// deAppel <Creator>
//
//Description:
// copy the contents of one *.txt file to another *.txt file.
//
// feature(s):
// Copy a file to another one
//
// How to use:
// CopyFiles.copyFile(String from, String to) Copy the txt file from one location to another.
//
// Known issue(s):
//
// Working on:
//
// Ark de Appel - www.engineeringserver.com
//———————————————————————-*/
import engineeringservercomUtilityPackage.CopyFiles;
public class CopyFileTest {
public static void main(String[] args){
CopyFiles CF = new CopyFiles();
CF.copyFile(”c:\\input.txt” , “c:\\output.txt”);
}
}
To copy the file you must create a CopyFiles object and call the copyFile method like this:
CF.copyFile(”c:\\input.txt” , “c:\\output.txt”);
Error handling:
The application will automaticly create the output.txt if the file doesn’t exist.
The application will generate a textmessage if the input text cannot be found.
Download the files here:
http://www.engineeringserver.com/Software/CopyFileTest.rar


More Options ...
Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 
[...] Engineeringserver.com An open source blog for computer science students and Java developers ← Copy a txt file from one location to another with Java [...]
[...] see my reply above, you can use this class i wrote to copy files from one directory to another: Engineeringserver.com | Copy a txt file from one location to another with Java to process it automatcally you can use a thread that checks the unprocessed folder every second [...]