neděle 9. ledna 2022

Android / Samsung: How to move data from SD card to a new bigger one

My 64GB SD card is filled up with images & videos, so i bought 256 MB and looked for tips how to move the data.

I inserted the old card into USB SD card reader, the new card into the laptom SD card slot.

The old card is E:\, the new is F:\   

First, I tried this:

E:\xcopy "*.*" F:\ /s /e /v /h

(reference: https://forums.tomsguide.com/threads/how-do-i-move-my-data-from-my-sd-card-to-a-new-one-on-my-samsung-galaxy-s-5.68262/)

 Unfortunatelly, the copying process died with some device error after about 50GB was transfered. This might happen because of the whacky SD card slot in my laptop, which does not hold the SD card firmly enough, so small movements of the laptop sometimes cause SD card disconnect.  

Then I tried the robocopy, which also prints nice statistics after finishing:

robocopy e:\ f:\ /s /e /r:0 /z

But I was not sure if the interrupted files were transfered correctly, so I decided to make checksums of all files on the SD card.

I used the MSYS2 environment with Linux command line as I already had it installed.

pacman -S rhash

pacman -S pv

rhash --md5 -p '%h;%p\n' -r /e |pv -ls 7049 > c/tmp/md5.txt

This creates TXT file, containing hash (%h) separated by ; and full path of the hashed file (%p).
The pv (pipe /progress viewer) is there for progress monitoring: -l is line mode, -s 7049 is the number of files I got from robocopy stats.    


Žádné komentáře: