File name/*
* Created on 2004-12-9
* I haven't found a common software that has this feature, so I wrote this class
* You can list files in the CD in TXT file, easy to find in the future, or print out.
* Do not need to find a disc in a CD-ROM to find a CD, slow and loss of optical drive.
* Of course, you can also select a directory to record all the file names under the directory.
*/
/**
* @author Shi Weifeng
* The Listfiles class can write all the file names in the directory to the text file you specify.
*/
Import java.io.*;
public class Listfiles {
private static String listfilestr= "";
public static void Main (string[] args) {
Try
{
File Savefile=new file (args[1]);
FileWriter fw=new FileWriter (savefile);
Listfiles lf=new listfiles ();
Lf.listfile (Args[0]);
Fw.write (LISTFILESTR);
Fw.close ();
}
catch (arrayindexoutofboundsexception ea)
{
Parameter hints
System.out.println ("Usage:listfiles <source dir> <target file>");
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.