
In my Java application I am renaming files to a file name provided in a String parameter. There is a method boolean OKtoRename(String oldName, String newName) which. This tutorial explains how to use the Java IO File class which enables you to do basic file system actions like renaming files, obtain directory listings etc.
Java File class represents the files and directory pathnames in an abstract manner. This class is used for creation of files and directories, file searching, file.


An abstract representation of file and directory pathnames. User interfaces and operating systems use system-dependent pathname strings to name files and directories. The Java NIO Files class provides a lot of useful file system functions, like creating directories, copying, moving and deleting files. Download Source Code. These are some utlities classes that I wrote some time back to monitor file creation, deletion, and modification in a specified directory.

1 /* 2 * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.