# Collection-file-path and expand-user-path

**URL:** <https://racket.discourse.group/t/collection-file-path-and-expand-user-path/255>\
**Category:** Questions & Answers\
**Created:** [November 25, 2021, 12:25am UTC](https://racket.discourse.group/t/collection-file-path-and-expand-user-path/255 "2021-11-25T00:25:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simonls](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/simonls/32/170_2.png) [@simonls](https://racket.discourse.group/u/simonls)\
**Post date:** [November 25, 2021, 2:13am UTC](https://racket.discourse.group/t/collection-file-path-and-expand-user-path/255/2 "2021-11-25T02:13:57Z")

</div>

Don please slow down for a bit and actually explain to us what you are trying to do.

If you want to write an application that uses files relative to its working directory, others have already pointed you to use `define-runtime-path` in other topics.

> [@Path function appropriate for](https://racket.discourse.group/t/path-function-appropriate-for/246/5):
>
> It sounds like you want to refer to files that are in a known location with respect to the source code. So, for instance, I might have a file called "email-processor.rkt" with a file called "email-rules.csv" that's in the same directory. In this case, I would echo Ryan Culpepper's suggestion that you use the runtime-path functions. here's a snippet of code that illustrates what I mean: #lang racket (require racket/runtime-path) (define-runtime-path here ".") (file-\>string (build-path here "e…

Why use `define-runtime-path`? Because it cooperates with `raco exe` and `raco distribute`, so that when you create an executable and distribution for your application, those commands automatically know how to "pack" the files you refer to into your distribution. Without you having to manually modify pathes. If that isn't what you want to do please let us know what it is. If we have an idea of what you want to accomplish it is easier to help.

---

_[View the full topic](https://racket.discourse.group/t/collection-file-path-and-expand-user-path/255)._
