Here I am sitting, thinking of something optimistic to write about. It’s very difficult, so here’s what I came up with…
String inputDir = "/home/user/";
String inputFile = "in.txt";
if (!inputDir.endsWith("/")) inputDir += "/";
File iFile = new File(inputDir + inputFile);
String outputDir = "/home/user/backup/";
if (!outputDir.endsWith("/")) outputDir += "/";
iFile.renameTo(outputDir + inputFile);

Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed