Hi * Community,
您好,*社区,
I would like to ask if there's a way to copy the files which are rated using a Windows Batch Job (.bat).
我想问一下是否有办法复制使用Windows批处理作业(.bat)评级的文件。
The files are photos, and some were rated in-camera. When all of these files (rated and unrated) are copied to my hard drive, I would like to let the batch job automatically copy out the files that are rated into another folder.
这些文件是照片,有些是在相机内进行评级的。当所有这些文件(评级和未评级)被复制到我的硬盘驱动器时,我想让批处理作业自动复制被评级到另一个文件夹的文件。
I know that my computer has no problem viewing the ratings as when I view the Properties of the rated files, a number of stars are displayed in it.
我知道我的电脑在查看评级时没有问题,因为当我查看评级文件的属性时,会显示许多星标。
Any help is much appreciated, and thank you in advanced =)
非常感谢任何帮助,谢谢你在高级=)
1 个解决方案
#1
Check tooltipinfo.bat.If the passed item is rated it will have in the output something like :
检查tooltipinfo.bat。如果传递的项目被评级,它将在输出中具有如下内容:
Rating: 5 Stars
so you need the tooltipinfo.bat in your directory.Then create batch file like :
所以你需要在你的目录中使用tooltipinfo.bat。然后创建批处理文件,如:
(not tested)
@echo off
set folder_with_the_items=C:\photos_and_videos
set destination_folder=C:\somewhere_else
for /f "tokens=* delims=" %%a in ('dir /a:-d /b /s "%folder_with_the_items%\*"') do (
call tooltipinfo.bat "%%~fa" | find /i "Rating:" >nul 2>nul && (
copy "%%~fa" "%destination_folder%"
)
)
As you'll need to change the folder locations at the beginning of the script.
因为您需要在脚本开头更改文件夹位置。
#1
Check tooltipinfo.bat.If the passed item is rated it will have in the output something like :
检查tooltipinfo.bat。如果传递的项目被评级,它将在输出中具有如下内容:
Rating: 5 Stars
so you need the tooltipinfo.bat in your directory.Then create batch file like :
所以你需要在你的目录中使用tooltipinfo.bat。然后创建批处理文件,如:
(not tested)
@echo off
set folder_with_the_items=C:\photos_and_videos
set destination_folder=C:\somewhere_else
for /f "tokens=* delims=" %%a in ('dir /a:-d /b /s "%folder_with_the_items%\*"') do (
call tooltipinfo.bat "%%~fa" | find /i "Rating:" >nul 2>nul && (
copy "%%~fa" "%destination_folder%"
)
)
As you'll need to change the folder locations at the beginning of the script.
因为您需要在脚本开头更改文件夹位置。