Page 1 of 1
Portable Device / iPhone Photo Backup
Posted: 04 Sep 2018 15:34
by xboxninja
I spent some time a couple weeks ago trying to write a script to backup the photos from my iPhone to my PC. I was not successful but I'm not sure if this is due to my weak XYplorer scripting knowledge or the inability of scripting to access files from portable devices.
I am able to see the device and get to the root of photo storage ("Dons iPhone 6s\Internal Storage\DCIM\") but scripting doesn't seem to be able to enumerate the files in directories under that directory. I have noticed that using XYplorer's drag and drop for copying files seems slow or unresponsive as well (and I end up using Explorer to copy photos from my phone) so maybe it just doesn't work with these devices.
Thanks in advance!
Re: Portable Device / iPhone Photo Backup
Posted: 06 Sep 2018 08:40
by highend
Code: Select all
$src = "Lenovo P2a42\Interner gemeinsamer Speicher\DCIM";
$items = quicksearch("/f", $src, , "s");
text $items;
Works fine on an android device, can't say anything about apple devices though...
Re: Portable Device / iPhone Photo Backup
Posted: 12 Sep 2018 21:24
by xboxninja
Thanks for checking! I'm just getting back to this today.
File enumeration does work but the moveto, copyto and backupto commands don't' seem to work.
I tried the following without any success:
Code: Select all
copyto "F:\images\cell_phone\don_incoming_test", "Dons iPhone 6s\Internal Storage\DCIM\105APPLE\IMG_E5001.JPG", , 1, 4, 1, 0, 0, 0, 0, 0;
and
Code: Select all
backupto "F:\images\cell_phone\don_incoming_test", "Dons iPhone 6s\Internal Storage\DCIM\105APPLE\IMG_E5001.JPG", 4, 1, 0, 0, 0, 0, 0;
I get a "copyto failed or was canceled" message when I try either one.
I wonder if this is due to these portable device files being handled differently by the OS?
Re: Portable Device / iPhone Photo Backup
Posted: 12 Sep 2018 22:51
by highend
No time to check this but have you tried to use shellcopy?
viewtopic.php?p=125741#p125741
Re: Portable Device / iPhone Photo Backup
Posted: 13 Sep 2018 17:19
by xboxninja
I tried shellcopy as suggested but received a "shell drop failed" error.
It's interesting to note that drag and drop from one tab or pane to another doesn't seem to work either. I was able to use the "copy to other pane" in the UI so I wonder if I can recreate that functionality through scripting?
Re: Portable Device / iPhone Photo Backup
Posted: 13 Sep 2018 17:33
by highend
Copy to Other pane is:
as a script
Re: Portable Device / iPhone Photo Backup
Posted: 14 Sep 2018 17:53
by xboxninja
Thanks again! I was able to write a very simple script to get all the image files in a given iPhone directory and copy them to my machine (after I have opened the image directory on the iPhone!):
Code: Select all
if (get("#800") == "0") {
#800;
}
focus P2;
goto "F:\images\cell_phone\don_incoming_cell";
focus P1;
setting 'BackgroundFileOps', 0;
selfilter "*.jpg;*.png;*.mov", f;
#804; //copy to other pane
text 'Done!';
It's not really the efficient solution I was looking for. My original goal was to be able to connect my iPhone to my PC and then run an XYPlorer script that would move through each of the directories on the phone recursively and copy all the image files within those directories to a location on my hard disk.
It seems, due the way "portable devices" are handled in Windows, that I've had to temper my expectations a bit. I wasn't even able to successfully iterate through the folders. I tried this both with scripting and by using the UI to create a report of the files on the phone. I guess the script I have is good enough for now.