Relocating file system for email client

I plan on formatting my computer, currently, EMclient it’s on my main hard drive, I would like to move it over to an external hard drive permanently, but don’t want to lose all my data, flags and tags that I currently have, what files would I need to move in order to accomplish this. I know there are going to be some %appdata% files, but I was not sure if there was an easier route to deal with this or other files I would need to also connect before I format.