3
The output of the following method is:
C: Users Desktop User files filename.jpg
How can I get just the filename.jpg
in String format? I tried to use FileUtils
but as a way out I got this:
����. ELs��/�G������Yos���e�([��E��v���^�C�O���W�ݭ�: Zj 2+ յ v [! J
public static void getImgs(String path){
File file = new File(path);
File[] arquivos = file.listFiles();
try {
for (File arquivo : arquivos) {
System.out.println(arquivo);
}
}catch (Exception e){
e.printStackTrace();
}
}
Already tried to print the file name?
arquivo.getName()
,arquivo.getCanonicalPath()
,arquivo.getAbsolutePath()
?– Gustavo Cinque