Search code examples
javapythongrailsjenkins

Jenkins command to display all file in directory?


I have created a workspace and clone all files in to that. Now, I'm running my code through jenkins. Can anyone assist how to display all the files in my workspace through any command. I tried with ${workspace} dir in Jenkins but it is showing any output.

Basically, if you are at any folder in your system and you open cmd and exceute dir in windows, it will display all the files in it. The same thing I want to see in Jenkins for windows.

Thanks.


Solution

  • Just dir no ${workspace}

    bat 'dir' in a pipeline script.

    Select a "execute batch command" option and write the commands you want to execute in there.

    Then check the console output of the build which was successful.