soteman
Technical User
- Jul 4, 2009
- 3
Hi everyone,
With a bit of help, I have the following script to use;
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
'First locate the users desktop
strDsk = WshShell.SpecialFolders("Desktop")
'Now add our base photo location
photobase = "\photos\"
'Ask For a new folder to create
newFolder = InputBox("Enter name of new photo directory to create", "New directory name")
photopath = strDsk & photobase & newFolder
If Not objFSO.FolderExists(photopath) Then
objFSO.CreateFolder(photopath)
End If
'Now we copy from the thumb drive/flash card: replace G: With the appropriate flash drive
Call WshShell.Run("cmd.exe /k robocopy H:\DCIM\100_Fuji " & photopath & "\ /E /ZB /COPYAT /XO")
I am using it to automatically copy all photos from my grandfather's camera to a folder on the desktop, as he has little technical knowhow, and wouldn't cope with learning to make new folders, and searching for photos and copy/pasting.
Can anyone suggest a way of only taking new photos off the camera? For the same tech-phobia related reasons, he doesn't really delete photos from the camera itself very often so rather than copying all his old photos too, can the script search all existing folders in desktop/photos and not replicate file names that already exist within the subfolders?
Thanks a lot to anyone who has gotten this far and actually understood my convoluted explanation and still wants to help
With a bit of help, I have the following script to use;
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
'First locate the users desktop
strDsk = WshShell.SpecialFolders("Desktop")
'Now add our base photo location
photobase = "\photos\"
'Ask For a new folder to create
newFolder = InputBox("Enter name of new photo directory to create", "New directory name")
photopath = strDsk & photobase & newFolder
If Not objFSO.FolderExists(photopath) Then
objFSO.CreateFolder(photopath)
End If
'Now we copy from the thumb drive/flash card: replace G: With the appropriate flash drive
Call WshShell.Run("cmd.exe /k robocopy H:\DCIM\100_Fuji " & photopath & "\ /E /ZB /COPYAT /XO")
I am using it to automatically copy all photos from my grandfather's camera to a folder on the desktop, as he has little technical knowhow, and wouldn't cope with learning to make new folders, and searching for photos and copy/pasting.
Can anyone suggest a way of only taking new photos off the camera? For the same tech-phobia related reasons, he doesn't really delete photos from the camera itself very often so rather than copying all his old photos too, can the script search all existing folders in desktop/photos and not replicate file names that already exist within the subfolders?
Thanks a lot to anyone who has gotten this far and actually understood my convoluted explanation and still wants to help