gaurav,
as already pointed out, the problem is of the character ':' which is not acceptable in windows. the code works fine on Unix.
also, you might want to change the line
boolean bool = file1.renameTo(new File("D:\\project\\vision\\files"+"\\"+tmstamp.toString));
to
otherwise you may end up giving the same name to all files.
[ July 18, 2006: Message edited by: Aalok Pandit ]
[ July 18, 2006: Message edited by: Aalok Pandit ]