2

I would like to backup Photoshop Touch files using adb pull in a Windows BAT file. The problem is that Photoshop Touch (using Save to Gallery) stores its files in /storage/sdcard0/Pictures/Adobe® Photoshop® Touch. I cannot figure out how to represent that name with the special character.

adb pull -a "/storage/sdcard0/PicturesAdobe® Photoshop® Touchadb" gives:

remote object '/storage/sdcard0/Pictures/Adobe½ Photoshop½ Touch' does not exist

adb shell ls "/storage/sdcard0/Pictures gives:

Adobe® Photoshop® Touch
Screenshots

(Actually the special character appears different in the cmd shell. I just copied it from there to the above.)

I also tried adb shell ls /storage/sdcard0/Pictures/Adobe*/. | tr -s "\n\r" "\0" | xargs --verbose --null --max-args=1 adb pull -a which gives:

C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1360025632957.p
ng' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1361031995178.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1378048402699.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1378649769043.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1378651034186.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1378651833677.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1389200848310.j
pg' does not exist
C:\Android\platform-tools\adb pull -a
remote object '/storage/sdcard0/Pictures/Adobe® Photoshop® Touch/1417468827724.j
pg' does not exist

Again, the ® looks different in the cmd shell, but the above is what pasted. I would have guessed this would work as it doesn't use any special characters that I input. The problem may be with tr, which I get from Cygwin.

The problem seems to be how the different parts handle the ®. I don't know any other way to get the name that must be entered in the BAT file.

Any help would be appreciated. Thank you.

Kenneth Evans
  • 2,179
  • 19
  • 26
  • Wow, you have every right to write a rant instead of a question. What happens if you `adb pull` the `/Pictures/*` directory? Does BTSync work? – 323go Dec 02 '14 at 00:02
  • Maybe try Character Map: start>all progs>accessories>system tools>character map. Set font to courier, copy reg mark to clipbd and paste into bat. **or** rename or copy folder on device to something plain and pull from there. – sjoy Dec 02 '14 at 04:13
  • 1
    Does it help to stick `chcp 65001` at the top of your batch script? [chcp changes the codepage](http://ss64.com/nt/chcp.html), and 65001 represents UTF-8. You might also need to change your console font to Lucida Console or some other TrueType font to handle extended characters like ®. – rojo Dec 02 '14 at 14:52
  • I tried chcp 65001 before. – Kenneth Evans Dec 02 '14 at 21:46
  • I am coming to the conclusion it is a bug. This seems to be a duplicate issue: http://stackoverflow.com/questions/24219090/adb-pull-file-with-special-character-in-its-path. The (unresolved) bug is referenced in the answer. – Kenneth Evans Dec 02 '14 at 21:49
  • Yes, pulling the Pictures directory or even the whole SD card works. There seems to be a discrepancy between what happens with "adb shell ls" and "adb pull" but not internally with pull. The special character in the cmd console is different in the ls output from in the error message from adb pull. However, what you see seems to depend on the console. I get a different result in the Emacs console. I don't think the problem is with the console but with sending ls output to pull. Also I have found no way to write the directory name that will work with pull. – Kenneth Evans Dec 02 '14 at 22:01
  • I can duplicate the problem using only Windows BAT commands, no Unix utilities like tr. – Kenneth Evans Dec 02 '14 at 22:12

0 Answers0