# Best way to ensure imported notes stay in a given deck?

**URL:** <https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619>\
**Category:** Suggestions\
**Created:** [September 18, 2024, 2:12pm UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619 "2024-09-18T14:12:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rauschma](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rauschma](https://forums.ankiweb.net/u/rauschma)\
**Post date:** [September 18, 2024, 2:12pm UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619/1 "2024-09-18T14:12:34Z")

</div>

Problem: If I import a `.txt` file with a `#deck` header, then imported cards whose IDs (=first columns) match cards in other decks, update the cards in those decks (and do not create new cards in the specified deck).

Potential solutions:

- Manually: Match scope = Notetype and deck
  - Downside: Must be activated manually each time.
  - Upside: simple

- File header: use `#deck column` and add an additional column.
  - Would this work?
  - Upside: Importers don’t have to remember to change the match scope.
  - Downside: makes files bigger

- File header `#columns:DeckPlusFront;Front;Back`
  - I qualify the ID (= `Front`) by putting the deck’s name in front of it.
  - Would that work automatically without the user having to intervene manually? In other words: Would `DeckPlusFront` be used for duplicate checking and `Front` as the front of each card – automatically?

Would it make sense for Anki to support a file header `#match scope`?

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [September 21, 2024, 7:28pm UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619/2 "2024-09-21T19:28:17Z")

</div>

Just to establish baseline terminology – you are importing _notes_ (not cards), Anki creates _cards_ from them based on the instructions in the note type, and those _cards_ (not notes) are placed in decks.

> [@rauschma](#):
>
> then imported cards whose IDs (=first columns) match cards in other decks, update the cards in those decks (and do not create new cards in the specified deck).

You said the problem, but you didn’t say what outcome you want instead.

If your goal is to create duplicate notes with their cards in the specified deck, can’t you already control that with the import options?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/9/5/95c676b5175173eeb30375bc45e62b611bed84b7.png)

Or is your goal to update an existing note and _move_ its cards to different deck?

---

<div class="post-metadata">

**Author:** ![HarperyTaylor](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@HarperyTaylor](https://forums.ankiweb.net/u/HarperyTaylor)\
**Post date:** [September 26, 2024, 5:14am UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619/3 "2024-09-26T05:14:54Z")

</div>

Well thankyou for this solutions i’m going to try these

---

<div class="post-metadata">

**Author:** ![rauschma](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rauschma](https://forums.ankiweb.net/u/rauschma)\
**Post date:** [September 27, 2024, 4:19pm UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619/4 "2024-09-27T16:19:20Z")

</div>

> [@Danika\_Dakika](#):
>
> You said the problem, but you didn’t say what outcome you want instead.

- I’ve done more experiments and, for now, manually setting “Match scope” to “Notetype and deck” does what I want (#1 of the potential solutions).

- Just as I can use a text file header to pre-set/pre-populate the import option “Deck”, I’d love to also be able to pre-set the import option “Match scope” – so that cards from an imported file don’t accidentally change cards in other decks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [October 27, 2024, 4:20pm UTC](https://forums.ankiweb.net/t/best-way-to-ensure-imported-notes-stay-in-a-given-deck/49619/5 "2024-10-27T16:20:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
