You are on page 1of 1

private void moveFiles(String strFolderPath){ String strFullPathReports = strFolderPath; File folder = new File(strFullPathReports); File[] listOfFiles = folder.

listFiles(); File fileDest; jProgressBar.setMinimum(0); jProgressBar.setMaximum(listOfFiles.length); for (int i = 0; i < listOfFiles.length; i++) { fileDest = new File(destino); try{ copiarFile(listOfFiles[i], fileDest); UpdateStatusLabel(MSG_MOVE + " >>> " + listOfFiles[i].getName() + " >>> " + destino); } catch(Exception e){ System.out.print("Error: " +e); } jProgressBar.setValue(i); jProgressBar.setStringPainted(true); Rectangle progressRect = jProgressBar.getBounds(); progressRect.x = 0; progressRect.y = 0; jProgressBar.paintImmediately(progressRect); } jProgressBar.setValue(listOfFiles.length); }

You might also like