# Neo4j-import admin programmatically

**URL:** <https://community.neo4j.com/t/neo4j-import-admin-programmatically/1029>\
**Category:** Import / Export\
**Created:** [September 4, 2018, 6:18pm UTC](https://community.neo4j.com/t/neo4j-import-admin-programmatically/1029 "2018-09-04T18:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishaan.madan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ishaan.madan/32/698_2.png) [@ishaan.madan](https://community.neo4j.com/u/ishaan.madan)\
**Post date:** [September 4, 2018, 6:18pm UTC](https://community.neo4j.com/t/neo4j-import-admin-programmatically/1029/1 "2018-09-04T18:18:16Z")

</div>

trying to use _neo4j-admin import_ directly from my java program (no command line action). Is there a recommended way to go about this? Want to throw out old data and import new data on a weekly basis.

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [September 4, 2018, 8:33pm UTC](https://community.neo4j.com/t/neo4j-import-admin-programmatically/1029/2 "2018-09-04T20:33:26Z")

</div>

I recommend to run it from a script. Really.

In Java you could run it with `Process.exec` or such.

There is an underlying API for neo4j-import, [which you can see in action here](https://github.com/jexp/neo4j-dataset-import/blob/master/src/main/java/friendster/MultiFileParallelImporter.java#L34-L118), but I would only use that for very specific reasons if you know what you're doing.
