# Need help adding /scratch shortcut to files menu

**URL:** <https://discourse.openondemand.org/t/need-help-adding-scratch-shortcut-to-files-menu/3979>\
**Category:** Get Help\
**Created:** [January 22, 2025, 8:12pm UTC](https://discourse.openondemand.org/t/need-help-adding-scratch-shortcut-to-files-menu/3979 "2025-01-22T20:12:05Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [January 23, 2025, 4:38pm UTC](https://discourse.openondemand.org/t/need-help-adding-scratch-shortcut-to-files-menu/3979/6 "2025-01-23T16:38:50Z")

</div>

Yea here’s how you can do that, you can call `split` on the string. Here’s a little program I made to demonstrate this. IDK if you want `domain1` in the scratch path or `domain1.local` so I’ve given both here.

```ruby
require 'etc'

# login should be Etc.getlogin
login = 'johrstrom@domain1.local'
basename, domain = login.split('@')

puts "/scratch/#{domain}/#{basename}"

# you want domain1 not 'domain1.local'
no_local_domain = domain.split('.').first

puts "/scratch/#{no_local_domain}/#{basename}"

```

---

_[View the full topic](https://discourse.openondemand.org/t/need-help-adding-scratch-shortcut-to-files-menu/3979)._
