List of usage examples for org.apache.commons.io FilenameUtils getFullPathNoEndSeparator
public static String getFullPathNoEndSeparator(String filename)
From source file:se.trixon.filebydate.Profile.java
public void setSourceAndDest(String[] args) { if (args.length == 2) { String source = args[0];/*from w w w. j a v a2 s . c o m*/ File sourceFile = new File(source); if (sourceFile.isDirectory()) { mSourceDir = sourceFile; mFilePattern = "*"; } else { String sourceDir = FilenameUtils.getFullPathNoEndSeparator(source); mSourceDir = new File(sourceDir); mFilePattern = FilenameUtils.getName(source); } setDestDir(new File(args[1])); } else { addValidationError(mBundle.getString("invalid_arg_count")); } }