1 Reply Latest reply on Jul 4, 2017 1:16 AM by try67

    How can make so commas not ok in folder name but okay in file name?

    sargums46564804 Level 1


      So someone was kind enough to provide the following code to generate an error message if there is a comma in the folder path.  However, this error is also coming up when there is a comma in the file name.  How can I make this error exclusive to only objecting a comma in the folder name and not the filename.  I don't care if there is a comma in the filename.  For example:


      C:\\test,in,the,program\file,1.pdf should generate an error

      C:\\testintheprogram\file,1.pdf should not generate an error


      if (/,/.test(this.path))

      {app.alert("Error 104: Action Wizard will not run with commas present in the path folder.  Please remove all commas from the path foler and re-execute the program.");

      event.rc = false;