src/main/java/com/xceptance/neodymium/visual/ai/util/Helper.java
/**
     * If the option for a destination is used in the test script, this method try to get a match for the destination
     * name. If a match is found everything get sort into the destination. Otherwise there will be new folders with the
     * given destination.
     * 
     * @param path
     *            where the match should be
     * @param currentActionName
     *            per argument given string out of the test script
     * @return result if there is a match the identification number get extracted for further use, null otherwise
     */
If the option for a destination is used in the test script, this method try to get a match for the destination
name. If a match is found everything get sort into the destination. Otherwise there will be new folders with the
given destination.

@param path
where the match should be
@param currentActionName
per argument given string out of the test script
@return result if there is a match the identification number get extracted for further use, null otherwise
If the option for a destination is used in the test script this method try to get a match for the destination name . If a match is found everything get sort into the destination . Otherwise there will be new folders with the given destination . @param path where the match should be @param currentActionName per argument given string out of the test script @return result if there is a match the identification number get extracted for further use null otherwise
public static String checkFolderForMatch(String path, String currentActionName)
    {
        String result = new String();
        File test = new File(path);
        File[] list = test.listFiles(new FilenameFilter()
        {
            @Override
            public boolean accept(File dir, String name)
            {
                return new File(dir, name).isDirectory();
            }
        });
        if (list != null)
        {
            for (File element : list)
            {
                if (element.toString().matches("(.*)" + currentActionName))
                {
                    result = element.toString().replaceAll("[^-?0-9]+", "");
                    break;
                }
            }
        }
        return result;
    }
public static String checkFolderForMatch ( String path , String currentActionName ) { String result = new String ( ) ; File test = new File ( path ) ; File [ ] list = test . listFiles ( new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { return new File ( dir , name ) . isDirectory ( ) ; } } ) ; if ( list != null ) { for ( File element : list ) { if ( element . toString ( ) . matches ( "(.*)" + currentActionName ) ) { result = element . toString ( ) . replaceAll ( "[^-?0-9]+" , "" ) ; break ; } } } return result ; }
If the option for a destination is used in the test script, this method try to get a match for the destination
 name.
If the option for a destination is used in the test script this method try to get a match for the destination name .
// check for matching name, if a match is found the identification number get extracted for further use.