简体   繁体   English

将元数据从一个文件批量复制到另一个文件(EXIFTOOL)

[英]Batch copy metadata from one file to another (EXIFTOOL)

Im currently using tags such as exiftool -FileModifyDate(<)datetimeoriginal, etc. in terminal/cmd... 我目前在终端/ cmd中使用诸如exiftool -FileModifyDate(<)datetimeoriginal等标签。

Im switching from icloud and the dates in the metadata are exif (meaning finder and windows explorer just see the date they were downloaded).. 我从icloud切换,元数据中的日期是exif(意思是finder和Windows Explorer仅看到它们的下载日期)。

It's working but for any sloMo videos that are M4V, they dont change.. I have the originals which do have the right dates and was wondering if there is a way to match file names (123.mp4 = 123.m4v) and copy the metadata over... But I also want to do it in batches. 它可以正常工作,但是对于任何M4V的sloMo视频,它们都不会改变。。我有确实有正确日期的原件,并且想知道是否存在一种方法来匹配文件名(123.mp4 = 123.m4v)并复制元数据结束...但是我也想分批处理。 (since every month I will be offloading my iphone every month or so) Thanks! (因为每个月以来,我都会每个月左右卸下iphone)谢谢!

It will depend upon your directory structure, but your command should be something like this: 这将取决于您的目录结构,但是您的命令应如下所示:
exiftool -TagsFromFile %d%f.mp4 "-FileModifyDate<datetimeoriginal" -ext m4v DIR

This assumes the m4v files are in the same directory as the mp4 files. 假设m4v文件与mp4文件位于同一目录中。 If not, change the %d to the directory path to the mp4 files. 如果不是,请将%d更改为mp4文件的目录路径。

Breakdown: 分解:
-TagsFromFile : Instructs exiftool that it will be copying tags from one file to another. -TagsFromFile :指示exiftool将标签从一个文件复制到另一个文件。
%d%f.mp4 : This is the source file for the copy. %d%f.mp4 :这是副本的源文件。 %d is a exiftool variable for the directory of the current m4v file being processed. %d是用于当前正在处理的m4v文件目录的exiftool变量。 %f is the filename of the current m4v file being processed, not including the extension. %f是当前正在处理的m4v文件的文件名,不包括扩展名。 The thing to remember is that you are processing m4v files that are in DIR and this arguments tells exiftool how to find the source mp4 file for the tag copy. 要记住的是,您正在处理DIR m4v文件,并且此参数告诉exiftool如何找到标签副本的源mp4文件。 A common mistake is to think that exiftool is finding the source files (mp4 in this case) to copy to the target files (m4v) when exiftool is doing the reverse. 一个常见的错误是认为exiftool执行相反操作时,exiftool正在查找源文件(在这种情况下为mp4)复制到目标文件(m4v)。
"-FileModifyDate<datetimeoriginal" : The tag copy operation you want to do. "-FileModifyDate<datetimeoriginal" :要执行的标签复制操作。 Copies the DateTimeOriginal tag in the file to the system FileModifyDate . 将文件中的DateTimeOriginal标记复制到系统FileModifyDate
-ext m4v : Process only m4v files. -ext m4v :仅处理m4v文件。

Replace DIR with the filenames/directory paths you want to process. DIR替换为要处理的文件名/目录路径。 Add -r to recurse into sub-directories. 添加-r递归到子目录。 If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation. 如果此命令在Unix / Mac下运行,请对任何双引号/单引号进行反向操作,以避免bash解释。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 批处理文件可将文件从一个目录复制到另一个目录 - Batch file to copy files from one directory to another 如何在批处理文件中将选定的文件从一个文件夹复制到另一个文件夹? - How to copy selected files from one folder to another in Batch file? 批处理:将一个txt文件的内容复制到另一个 - Batch: copy content of one txt file into another Windows批处理将一种XML复制到另一种XML - Copy from one XML to another by Windows batch 批处理文件将特定行从一个文本文件复制到另一个文本文件 - Batch file to Copy particular lines from one text file to another text file 将数据从一个文件复制到另一个文件不起作用(批处理脚本) - Copy data From one file to another file doesn't work (Batch Script) 如何使用批处理脚本将文件从一台Windows计算机复制到特定驱动器中的另一台Windows计算机? - How to copy the file from one windows machine to another windows machine in a particular drive using batch script? 批处理脚本可根据上次修改日期或创建日期将文件从一个网络共享复制到另一个网络共享 - Batch script to copy a file from one network share to another based on lastmodified or creation date 批处理文件将超过30分钟的文件从一个文件夹复制到另一个文件夹 - batch file to copy files older than 30 minutes from one folder to another 批处理文件,仅将每个子文件夹的文件类型之一复制到另一个文件夹 - batch file to copy only one of filetype for each subfolder to another folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM