# Importing file from command handler

**URL:** <https://forums.concretecms.org/t/importing-file-from-command-handler/3597>\
**Category:** Developing with Concrete\
**Created:** [July 25, 2022, 1:34pm UTC](https://forums.concretecms.org/t/importing-file-from-command-handler/3597 "2022-07-25T13:34:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparkymeister](https://forums.concretecms.org/user_avatar/forums.concretecms.org/sparkymeister/32/1176_2.png) [@sparkymeister](https://forums.concretecms.org/u/sparkymeister)\
**Post date:** [July 25, 2022, 1:34pm UTC](https://forums.concretecms.org/t/importing-file-from-command-handler/3597/1 "2022-07-25T13:34:32Z")

</div>

Using version 9.1.1.

I’m trying to create a task that imports image files. The docs say to use \Concrete\Core\File\Importer ([importing New Files](https://documentation.concretecms.org/developers/working-with-files-and-the-file-manager/importing-new-files)) but this is deprecated. It works, but it seems like a bad idea to use deprecated classes. So how do I get a copy of Concrete\Core\File\Import\FileImporter from inside a CommandHandler? Also, why do the docs tell you to use a deprecated class?

---

<div class="post-metadata">

**Author:** ![jessicadunbar](https://forums.concretecms.org/user_avatar/forums.concretecms.org/jessicadunbar/32/4320_2.png) [@jessicadunbar](https://forums.concretecms.org/u/jessicadunbar)\
**Post date:** [July 26, 2022, 6:49pm UTC](https://forums.concretecms.org/t/importing-file-from-command-handler/3597/2 "2022-07-26T18:49:10Z")

</div>

I sent your suggestion about using depreciated classes in the importing new files page for an update.
