# Default workspace is empty after build

**URL:** https://community.jenkins.io/t/default-workspace-is-empty-after-build/6823
**Category:** Ask a question
**Tags:** question
**Created:** [April 12, 2023, 12:25pm UTC](https://community.jenkins.io/t/default-workspace-is-empty-after-build/6823 "2023-04-12T12:25:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Shivani](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Shivani](https://community.jenkins.io/u/Shivani)
#### Post date: [April 12, 2023, 12:25pm UTC](https://community.jenkins.io/t/default-workspace-is-empty-after-build/6823/1 "2023-04-12T12:25:47Z")

</div>

I’m not able to see the folders in workspace, showing empty in pipeline job, adding the piece of pre-written code below:

```
sh'''
            echo $JVM_version
            echo s-$brand_name-HD-PVR_Lite-tsc-k1p-sat-halv$HAL_version-jvm$JVM_version
            cd $Build_Dir
            echo deleting $Local_Dir folder
            rm -rf $Local_Dir
            echo $Local_Dir folder deleted succesfully.
            mkdir $Local_Dir
            chmod 777 $Local_Dir
            cd $Local_Dir
            git clone "URL"
            .
            .
            .
            .
            other activities

```

When I’m giving the location of default workspace in Build\_dir, then I’m able to see files and folders in workspace as well but build files are also there so that will create confusion, So workspaceDir and Build\_Dir should be different,  
is there some problem with above code? why default workspace is empty?

---

<div class="post-metadata">

### Author: ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)
#### Post date: [April 13, 2023, 11:37am UTC](https://community.jenkins.io/t/default-workspace-is-empty-after-build/6823/2 "2023-04-13T11:37:56Z")

</div>

Not clear where your problem is. How and where is `Build_dir` and all the other variables defined? You use single quotes in your sh step which means variables are not extrapolated by Jenkins but only by the shell. So Build\_dir would need to be an environment variable.  
It helps when you show your complete pipeline and the log output (redact sensitive information)
