Turn the phone off (long-press the power button to get the menu if you can't just remove the battery).
Remove the card.
Turn the phone on and turn Device Maintenance off as soon as you can get to it.
As far as transferring the files to your laptop, you're "outrunning" USB's ability to transfer files. I know that with 5,000 files, you don't want to do them in groups of 50, but unless you can write some software that can copy 1 or 2 files, then wait until they're copied before copying the next 1 or 2 (you can experiment to see how much work you can push your particular USB setup), you're going to have to do it in batches.
You could open a command window on the PC, then use dir x: (or whatever letter the SD card shows as) /b /s > transfer.bat (or whatever you want to name the file, but leave the .bat ending), then edit the file (it's going to be plain text) to add the word copy at the front of each line with a file you want to copy (and delete all the lines of files you don't want to copy). Then add
pause
every 10 or 20 (or whatever number works) lines, so you'll get a bunch of files copies to the laptop, then the action will pause for you to press a key. It will still take a long time, but not as long as doing it one file at a time.
Or, if there aren't too many files in each folder on the card, make a folder on the laptop, then drag one file from the card to the laptop folder (name it SD card backup or image backup or whatever you like) at a time and wait for all the files (and folders and the files in them and etc.) to be transferred.
02-23-2018 04:11 PM