Syncing between C drive and phone with robocopy

9,273

No, this is not possible. You’re accessing the phone using MTP or PTP. They are not filesystem access protocols but rather object storage protocols. The objects just happen to have a 1:1 mapping to files on your phone.

Somebody asked a related question, How do I access MTP devices on the command line in Windows? The answer is:

Unfortunately, APIs exposed by MTP are very different from a normal filesystem APIs. Therefore exposing MTP device as a read/write filesystem is not possible.

Of course, this also applies to all GUI tools that are not explicitly MTP-aware.

Share:
9,273

Related videos on Youtube

user2752467
Author by

user2752467

Updated on September 18, 2022

Comments

  • user2752467
    user2752467 over 1 year

    I'm on Windows 10 and trying to sync my music folder with the one on my LG G5. My plan is to use robocopy /mir, but I don't know how to write out a path to the directory on my phone. The phone's set to file transfer mode, so I can navigate to it in Windows Explorer through This PC > G5 > Internal storage. But there's not a drive letter or anything so I'm not sure what the command line path is. Is this even possible?

    Since someone asked, the list volume command in diskpart outputted the following:

    Volume ###  Ltr  Label        Fs     Type       Size     Status     Info
    ----------  ---  -----------  -----  ---------  -------  ---------  --------
    Volume 0     D                       DVD-ROM        0 B  No Media
    Volume 1                      NTFS   Partition   350 MB  Healthy    System
    Volume 2     C                NTFS   Partition   439 GB  Healthy    Boot
    

    As you can see, the phone isn't listed.

    • Tech-IO
      Tech-IO over 7 years
      What shows Diskpart on commandline?
    • user2752467
      user2752467 over 7 years
      @GiaRui I'm not very familiar with diskpart. What command(s) would help me answer your question?
    • Tech-IO
      Tech-IO over 7 years
      Go to "start" in search type "cmd" right click on it and start as Administartor. Then type in the commandline Diskpart, as Diskpart is ready, type "list volume" to see the devices(partitions).
    • user2752467
      user2752467 over 7 years
      @GiaRui I've added that output.
    • pulsarjune
      pulsarjune over 7 years
      Why robocopy when you could use a more intuitive GUI based SYNCTOY SYNCTOY. I presume this will match your requirements more in this case
    • user2752467
      user2752467 over 7 years
      @pulsarjune My intention was to write a batch script so I can sync the files simply by running the script. Anyways, does synctoy support MTP and PTP?