question

Bernie-4453 avatar image
0 Votes"
Bernie-4453 asked MotoX80 commented

How to access a path with "This PC"?

When I connect my Android phone to my Windows 10 PC, files are accessible using this path that I copied in File Explorer::

This PC\Bernie's Galaxy S10e\Card\DCIM\Favorites

I'm trying to write a PowerShell script that calls robocopy to copy some files to the above path. How can I access a path with "This PC" from the command line?

-TIA

azure-files
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered MotoX80 commented

capture.jpg (188.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi MotoX80,

Your script is perfect, thanks so much for that :-)

Now, I wonder how could I check the Last Modified Date of each file before copying. The idea would be to copy only files older than, for example, 1 month.
I have tried with "ModifyDate" property of FolderItem object (https://docs.microsoft.com/en-us/windows/win32/shell/folderitem), but it returns always "12/30/1899 12:00:00 AM" regardless the real Las Modified Date.

I would be really grateful if you could provide some tip.

Thanks in advance!


0 Votes 0 ·

Sorry, I get the same results. And file size is zero too. Must be a limitation of the MTP interface.

Application : System.__ComObject
Parent : System.__ComObject
Name : IMG_20220611_134936531_HDR.jpg
Path : ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_22b8&pid_2e82#zy22ct9p4w#{6ac27878-a6fa-4155-ba85
-f98f491d4f33}\SID-{10001,,115281080320}{E56154A2-FFFF-FFFF-0000-000000000000}{19E9BC3E-0000-0000-00
00-000000000000}{372C532E-0000-0000-0000-000000000000}
GetLink :
GetFolder :
IsLink : False
IsFolder : False
IsFileSystem : False
IsBrowsable : False
ModifyDate : 12/30/1899 12:00:00 AM
Size : 0
Type : JPG File


0 Votes 0 ·
MotoX80 avatar image
0 Votes"
MotoX80 answered Bernie-4453 commented
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your response. I tried using a couple of your PowerShell functions to get the Android phone directory. For some reason the $phoneDirectory is assigned "System.__ComObject", and not the phone directory path as expected. So here the "Dest" is completely wrong, and nothing to do with the phone directory assigned below. Any idea what I'm doing wrong?


$phoneName = "Bernard's Galaxy S10e"


Functions Here............

$phoneRootDir = Get-PhoneMainDir $phoneName
$phoneCardPhotosSourceDir = Get-SubFolder $phoneRootDir "Card\DCIM\Bernie3_Artwork_Test"
$DestDirForPhotos = Get-SubFolder $phoneRootDir "Card\DCIM\Bernie3_Artwork_Test"

$Files = "."
$Source = "\\ds418\Media Library\Barton_Family_Media\Misc_Photos\Bernie3_Artwork"
robocopy $Source $DestDirForPhotos /IF $Files /E

0 Votes 0 ·