# Command line arguments

**URL:** <https://discourse.mapeditor.org/t/command-line-arguments/623>\
**Category:** Questions\
**Created:** [June 30, 2015, 11:41pm UTC](https://discourse.mapeditor.org/t/command-line-arguments/623 "2015-06-30T23:41:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rockytv](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@rockytv](https://discourse.mapeditor.org/u/rockytv)\
**Post date:** [June 30, 2015, 11:41pm UTC](https://discourse.mapeditor.org/t/command-line-arguments/623/1 "2015-06-30T23:41:16Z")

</div>

I was browsing Tiled’s source, and I’ve found that it has only 5 command line arguments. Is it correct?

I want to know if there is an argument which allows you to open the specified tmx file in the editor.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [July 1, 2015, 7:11pm UTC](https://discourse.mapeditor.org/t/command-line-arguments/623/2 "2015-07-01T19:11:35Z")

</div>

Any non-option argument is interpreted as a file to open, so you can open any number of files directly from the command line. This is briefly mentioned in the command-line help:

```nohighlight
[bjorn@thor ~]$ tiled --help
Usage:
  tiled [options] [files...]

Options:
  -h --help : Display this help
  -v --version : Display the version
     --quit : Only check validity of arguments
     --disable-opengl : Disable hardware accelerated rendering
     --export-map : Export the specified tmx file to target
     --export-formats : Print a list of supported export formats

```

---

<div class="post-metadata">

**Author:** ![rockytv](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@rockytv](https://discourse.mapeditor.org/u/rockytv)\
**Post date:** [July 1, 2015, 8:08pm UTC](https://discourse.mapeditor.org/t/command-line-arguments/623/3 "2015-07-01T20:08:45Z")

</div>

Thanks. The windows version does not output these in the console.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [July 1, 2015, 8:13pm UTC](https://discourse.mapeditor.org/t/command-line-arguments/623/4 "2015-07-01T20:13:13Z")

</div>

Right, that’s a little tricky on Windows and currently I don’t know how to solve it without always having a console popping up when running Tiled outside of a command line, which I think is much worse. It is covered by the following issue:

[https://github.com/bjorn/tiled/issues/953](https://github.com/bjorn/tiled/issues/953)
