[ Back | Previous | Next ]

How get a filename without extensions

Package:
java.io.*
Product:
JDK
Release:
1.0.2
Related Links:
General
File
FilenameFilter
FileWriter
JPEGCodec
ObjectInputStream
OutputStream
PipedInputStream
PrintWriter
StreamTokenizer
Comment:
			File f = new File(args[k]);
			String fileName = f.getName().substring(0, f.getName().lastIndexOf("."));
			System.out.println(".." + fileName);
1