1 000 FAQ, 500 tutoriels et vidéos explicatives. Ici, il n'y a que des solutions !
Importer les photos Google vers kDrive
Ce guide détaille comment importer vos photos depuis Google Photos (https://photos.google.com/) sur kDrive Infomaniak.
1. Exporter vos photos Google‍
Pour récupérer sur votre disque dur d'ordinateur l'ensemble de vos photos stockées sur Google Photos, il faut utiliser le service Google Takeout. Celui vous permet notamment de choisir quels albums récupérer si vous souhaitez procéder par étapes:
- Connectez-vous Ă Google Takeout.
- Désélectionnez l'ensemble des produits pour ne conserver que Google Photos:
- Si nécessaire désélectionnez les albums à ne pas exporter:
- Passez à l'étape suivante en bas de page:
- Configurez l'export par archives ZIP:
- Cliquez en bas sur le bouton “Créer une exportation” pour démarrer l'exportation.
- Patientez (plusieurs heures voire plusieurs jours) jusqu'Ă l'obtention d'un e-mail contenant les liens d'exportation en ZIP.
- Téléchargez puis décompressez le contenu sur votre ordinateur:
- Nettoyez et fusionnez si nécessaire vos différents dossiers photos.
2. Corriger les dates des photos exportées…
Lors de l'exportation, les dates de création des fichiers sont modifiées et remplacées par la date d'exportation au lieu de la date originale de prise de vue. Il faut donc procéder à une correction des dates via un script adéquat.
Voici un script pour utilisateurs avertis qui permet de rétablir les bonnes données à vos fichiers à partir des informations EXIF (il est recommandé de traiter des lots de 7000-8000 photos max. pour éviter un plantage):
… sur macOS
- Téléchargez ExifTool https://exiftool.org/index.html (macOS Package).
- Installez l'application en autorisant son ouverture au préalable si nécessaire:
- Ouvrez Script Editor (situé dans votre dossier Applications > Utilitaires):
- Cliquez sur Nouveau document.
- Copiez-collez le long script proposé ci-dessous vers la fenêtre de Script Editor.
- Cliquez sur Exécuter pour démarrer le script, une fenêtre s'ouvre:
- Sélectionnez le dossier à analyser.
- Laissez ensuite le script tourner, il modifiera les dates ou écrira les erreurs dans un fichier
errors.txt
sur le bureau.
Le script à copier-coller entièrement:
-- replace file date with EXIF creation date or date from name after the first dash -
tell application "Finder"
set FolderPath to choose folder with prompt "Select the folder containing the files to update"
my processFolder(FolderPath)
end tell
on processFolder(aFolder)
tell application "Finder"
-- process files:
set fileList to files of aFolder
repeat with eachFile in fileList
-- process a single file
set theFile to eachFile
set AppleScript's text item delimiters to {""}
set fileName to name of eachFile --get the file name
set eachFile to eachFile as string --file path
set hasDate to true --initialize date found flag
try
--get date if available
set photoDate to do shell script "/usr/local/bin/exiftool -DateTimeOriginal " & quoted form of POSIX path of eachFile
if photoDate is "" then set photoDate to do shell script "/usr/local/bin/exiftool -CreationDate " & quoted form of POSIX path of eachFile
if photoDate is "" then set photoDate to do shell script "/usr/local/bin/exiftool -CreateDate " & quoted form of POSIX path of eachFile
if photoDate is "" then
set hasDate to false --check if date was found
end if
on error
set hasDate to false -- error retrieving date
set photoDate to ""
end try
if length of photoDate > 20 then
--format extracted date
set x to (length of photoDate) - 33
set OriginalDate to text -x thru -1 of photoDate
set formattedDate to text 1 thru 5 of OriginalDate
set theYear to formattedDate
set formattedDate to formattedDate & text 7 thru 8 of OriginalDate
set theMonth to text 7 thru 8 of OriginalDate
set formattedDate to formattedDate & text 10 thru 11 of OriginalDate
set theDay to text 10 thru 11 of OriginalDate
set formattedDate to formattedDate & text 13 thru 14 of OriginalDate
set theHour to text 13 thru 14 of OriginalDate
set formattedDate to formattedDate & text 16 thru 17 of OriginalDate
set theMinute to text 16 thru 17 of OriginalDate
set formattedDate to formattedDate & "." & text 19 thru 20 of OriginalDate
set theSecond to text 19 thru 20 of OriginalDate
set newName to theYear & "-" & theMonth & "-" & theDay & " " & theHour & "." & theMinute & "." & theSecond
set testValue to formattedDate as string --check if found date is 000
if testValue is " 000000000000.00" then
set hasDate to false
else
-- set file date to original EXIF date and write to log
do shell script "touch -t " & formattedDate & " " & quoted form of POSIX path of eachFile
set logFile to open for access ((path to desktop folder as text) & "Date Found.txt") as text with write permission
write "Original date found for file: " & OriginalDate & " " & eachFile & return to logFile starting at eof
close access logFile
end if
end if
if hasDate is false then
-- get date from file name after first dash
set nb to ""
set nameDate to ""
set fileName to fileName as string
set savedDelimiters to AppleScript's text item delimiters --save delimiters
set AppleScript's text item delimiters to {"-"} --split on "-"
set nb to offset of "-" in fileName
if nb is not 0 then
set AppleScript's text item delimiters to savedDelimiters --restore delimiters
set nameDate to characters (nb + 1) thru (nb + 8) of fileName as string
set nameDate to nameDate & "1200.00"
set cmd1 to "/usr/local/bin/exiftool -datetimeoriginal=" & nameDate & " " & quoted form of POSIX path of eachFile
set cmd2 to "/usr/local/bin/exiftool -createdate=" & nameDate & " " & quoted form of POSIX path of eachFile
end if
try
-- write date from name to EXIF
do shell script cmd1
do shell script cmd2
do shell script "touch -t " & nameDate & " " & quoted form of POSIX path of eachFile
do shell script "rm " & quoted form of POSIX path of (eachFile & "_original")
on error
-- if date from name is invalid, log the error
set logFile to open for access ((path to desktop folder as text) & "Date Error.txt") as text with write permission
write "No valid date found in file name: " & eachFile & return to logFile starting at eof
close access logFile
end try
end if
end repeat
-- process folders:
set folderList to folders of aFolder
repeat with eachSubfolder in folderList
-- process a subfolder
my processFolder(eachSubfolder)
end repeat
end tell
end processFolder
tell application "Finder"
display dialog "Done! All files processed." buttons {"Close"}
end tell
… sur Windows
- Téléchargez ExifTool https://exiftool.org/index.html (exécutable Windows)
- Placez-le dans un dossier accessible (par exemple
C:\ExifTool
). - Renommez
exiftool(-k).exe
enexiftool.exe
. - Notez son chemin (par exemple
C:\ExifTool\exiftool.exe
). - Copiez-collez le long script proposé ci-dessous dans un fichier texte type bloc-notes sur votre ordinateur.
- Modifiez si nécessaire le chemin spécifié dans le fichier avec celui noté au point 4.
- Enregistrez-le avec l'extension
.ps1
, par exempleUpdateExifDates.ps1
. - Cliquez droit sur le fichier
.ps1
pour l'exécuter avec PowerShell (un environnement d'interpréteur de commandes et d'écriture de scripts, préinstallé sur les versions modernes de Windows). - Sélectionnez le dossier à analyser.
- Laissez ensuite le script tourner, il modifiera les dates ou écrira les erreurs dans un fichier
DateError.txt
sur le bureau.
PowerShell peut bloquer les scripts. Pour autoriser leur exécution (si nécessaire), ouvrez PowerShell en tant qu'administrateur et tapez Set-ExecutionPolicy RemoteSigned
.
Le script à copier-coller entièrement:
# === Configuration ===
$exifToolPath = "C:\ExifTool\exiftool.exe"
$desktop = [Environment]::GetFolderPath("Desktop")
$logFound = Join-Path $desktop "DateFound.txt"
$logError = Join-Path $desktop "DateError.txt"
# === Folder Selection Dialog ===
$folder = (New-Object -ComObject Shell.Application).BrowseForFolder(0, "Select the folder to process", 0).Self.Path
function Process-Folder {
param ([string]$path)
Get-ChildItem -Path $path -Recurse -File | ForEach-Object {
$file = $_
$filePath = $file.FullName
$fileName = $file.Name
$hasDate = $true
# Try reading EXIF date
$photoDate = & $exifToolPath -DateTimeOriginal "$filePath"
if (-not $photoDate) { $photoDate = & $exifToolPath -CreateDate "$filePath" }
if (-not $photoDate) { $hasDate = $false }
if ($hasDate -and $photoDate -match "\d{4}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}") {
$dateString = $matches[0] -replace "[:]", "", 1, 2 -replace "[:]", "", 1, 1 -replace " ", ""
$formattedDate = $dateString.Substring(0, 12) + "." + $dateString.Substring(12, 2)
try {
$newDate = [datetime]::ParseExact($photoDate.Trim(), "yyyy:MM:dd HH:mm:ss", $null)
[System.IO.File]::SetCreationTime($filePath, $newDate)
[System.IO.File]::SetLastWriteTime($filePath, $newDate)
Add-Content -Path $logFound -Value "EXIF date set for: $fileName → $photoDate"
} catch {
$hasDate = $false
}
}
if (-not $hasDate) {
if ($fileName -match "-(\d{8})") {
$nameDate = $matches[1] + "1200.00"
try {
& $exifToolPath "-datetimeoriginal=$nameDate" "$filePath"
& $exifToolPath "-createdate=$nameDate" "$filePath"
$touchDate = $nameDate.Substring(0,12) + "." + $nameDate.Substring(12,2)
$newDate = [datetime]::ParseExact($touchDate, "yyyyMMddHHmm.ss", $null)
[System.IO.File]::SetCreationTime($filePath, $newDate)
[System.IO.File]::SetLastWriteTime($filePath, $newDate)
Add-Content -Path $logFound -Value "Date from filename set for: $fileName → $newDate"
} catch {
Add-Content -Path $logError -Value "Invalid date in filename: $fileName"
}
} else {
Add-Content -Path $logError -Value "No valid date found for: $fileName"
}
}
}
}
# Execute processing
Process-Folder -path $folder
[System.Windows.Forms.MessageBox]::Show("Done! All files processed.")
3. Importer les photos sur kDrive
Une fois que vos photos sont prêtes, si leur nombre n'est pas trop important (quelques milliers d'éléments) et que votre connexion Internet est adaptée, vous pouvez simplement ouvrir l'app Web kDrive (service en ligne kdrive.infomaniak.com) et choisir d'importer à l'endroit désiré le dossier contenant vos photos:
- Cliquez ici afin d'accéder à l'app Web kDrive Infomaniak (service en ligne kdrive.infomaniak.com).
- Naviguez pour vous rendre Ă l'emplacement qui accueillera vos photos.
- Cliquez sur le bouton ‍ Nouveau en haut à gauche.
- Cliquez sur Importer un dossier.
- Sélectionnez le dossier contenant vos photos sur votre ordinateur.
- Patientez jusqu'à l'import complet de vos données (le journal d'activités défile en bas à droite):
Sinon dans le cas où vous synchronisez vos données à l'aide de l'app desktop, placez simplement vos photos dans l'arborescence de votre dossier kDrive sur l'ordinateur. La synchronisation va débuter et vos photos seront envoyées en sécurité sur les serveurs Infomaniak.
4. Accéder aux photos depuis vos appareils
Vous pouvez désormais accéder à vos photos sur vos différents appareils connectés à kDrive (le temps qu'ils se synchronisent s'il s'agit de l'app desktop kDrive).
Sur l'app Web kDrive (service en ligne kdrive.infomaniak.com), vous pouvez modifier la présentation pour mieux visualiser vos clichés avec un affichage agrandis des miniatures: