java mengambil nama file dalam folder

Bagaimana cara mengambil nama file dalam suatu folder


q> Langsung Aja (LA)

package com.saifiahmada.mysqllog;


/** @author Saifi Ahmada Sep 24, 2014 10:20:54 AM **/

public class MysqlLog {

public static void main (String [] args) {

File folder = new File("/home/saifi/Program/MYSQL_LOG/");

File [] files = folder.listFiles();

for (File file : files) {
System.out.println("Nama File : " + file.getName());




q> Output

Published by


Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s