Hi Rupali

The following should work

   node('windows') {
      def myDir = pwd
      bat "echo ${myDir}"
   }

/James

On 05/12/2014 13:11, Rupali wrote:
Hi,

I am using workflow plugin and in one of the workflow steps, I would like to know my current directory (full path) and use that in my bat script.
I tried using pwd command but it gives below error:

groovy.lang.MissingPropertyException: No such property: pwd for class: WorkflowScript

Can someone advise on how to read current directory path into a variable which I can use in my bat script?

Regards,
Rupali


--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5481B960.9000609%40teilo.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to