# Getting a user specified file location

**URL:** <https://discourse.slicer.org/t/getting-a-user-specified-file-location/3530>\
**Category:** Development\
**Created:** [July 20, 2018, 4:03am UTC](https://discourse.slicer.org/t/getting-a-user-specified-file-location/3530 "2018-07-20T04:03:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Troy](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@Troy](https://discourse.slicer.org/u/Troy)\
**Post date:** [July 20, 2018, 4:03am UTC](https://discourse.slicer.org/t/getting-a-user-specified-file-location/3530/1 "2018-07-20T04:03:11Z")

</div>

So I’m writing a program that uploads and reads a file format from the Seimans format (not DICOM), and I need to write a way to have the user find the file location, and then save that location as a string. Pretty much the equivalent of the general “upload” button. However, everywhere I look, the only way I can find to do this (and how I’ve done it in the past) is using TKinter’s filedialogue command, and tkinter isn’t available in the slicer libraries.

Is there any way to do this using slicer’s libraries?

Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 20, 2018, 5:06am UTC](https://discourse.slicer.org/t/getting-a-user-specified-file-location/3530/2 "2018-07-20T05:06:41Z")

</div>

There are many widgets that you can use to ask file path from the user. I prefer `ctk.ctkPathLineEdit()`, as it allows you to copy-paste, select using a dialog (if you click … button), and can also save most recent selections. There are also several Qt widgets that can be used.
