Skip to content

wild card characters in filename not working as expected #262

@vsathyak

Description

@vsathyak

Code snippet

if(shell.test('-f', '/Users/test/protractor/MyProject/downloadedFiles/TestFile.csv')){
shell.echo('File exist');
} else {
shell.echo('File not exist');
}

The above piece of code is working fine since i mentioned the full path of the file but if the filename contains a wildcard character
eg /Users/test/protractor/MyProject/downloadedFiles/*.csv

then the script is always failing and prints the else block always..

Please correct me if there is anything wrong with my code..!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions