public static boolean isValidWinPath(String path)
    {
	// If user inputs only a drive letter.
	if (path.length() == 3){ return false; }
	else if (path.endsWith("\\")){ return false; }
	else
	{
	    String regex="([a-z]:\\\\(?:[-\\w\\.\\d]+\\\\)*(?:[-\\w\\.\\d]+)?)";

	    Pattern p = Pattern.compile(regex,Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
	    Matcher m = p.matcher(path);

	    // Invalid path characters to explicitly check for.
	    String[] invalidChars = {"\"","/","*","?","<",">","|"};

	    for(int i = 0; i < invalidChars.length;i++)
	    {
		if(path.contains(invalidChars[i]))
		    return false;
	    }

	    // Check the only colon appears at start of path, i.e. C:\
	    if(path.indexOf(":")>1)
		return false;

	    return (m.find());
	}
    }