I get the following exception when trying to search a
UNC path:
DEBUG 2004-12-30 21:20:57,266 [main] Report -
Checking \\10.21.12.97\BackupNY097\Backup
Databases\*
java.lang.IllegalArgumentException: "//" not allowed
at jregex.util.io.PathPattern.<init>
(jregex/util/io/PathPattern.java:177)
at jregex.util.io.PathPattern.<init>
(jregex/util/io/PathPattern.java:151)
at jregex.util.io.PathPattern.<init>
(jregex/util/io/PathPattern.java:143)
at Report.validateDate(Report.java:423)
at Report.insert(Report.java:93)
at DB_Backup_Restore_Report.main
(DB_Backup_Restore_Report.java:81)
Exception in thread "main"
Java Result: 1
Escaping the slashes doesn't help any. Here is the code:
strPattern = "\\\\10.21.12.97\\BackupNY097\\Backup
Databases\\*";
PathPattern pp=new PathPattern(strPattern);
logger.debug("Count:\t" + pp.files().length);