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

Required

Required, hidden

*
To prove that you're not a bot, enter this code
Anti-Spam Image

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


Recent Pages

Popular Tags

Calendar

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Recent Comments

Associated Web Stop

Blogroll

Miscellaneous Hyperlinks

Shirtshop

Feed On

Enter your email address:

Visitors Online

Advertisement