attiqfsd

Untitled

May 9th, 2021
921
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :: bat file
  2. :: V 4.0
  3. @ECHO off
  4. setlocal enabledelayedexpansion
  5.  
  6. set batpath=%~dp0
  7.  
  8.  
  9. echo.>"!batpath!\log.txt"
  10.  
  11. For /F "usebackq tokens=1,2  delims==" %%a in (tags.txt) Do (
  12.   set link=%%a
  13.   set tags=%%b
  14.  
  15. for /f %%h in ('type weblinks.txt') do (
  16.     set link=%%h
  17.  
  18.  
  19. set foldername=!link:https://www.=!
  20. set foldername=!foldername:/=!
  21.  
  22. cd /d !foldername!
  23.  
  24.  
  25. for /f "tokens=*" %%G in ('dir /b *.jpg') do (
  26.  
  27.    
  28.     set imagename=%%G
  29.     rem echo "!imagename!"
  30.     set imagenameonly=%%~nG
  31.     set extn=%%~xG
  32.  
  33.  
  34. "!batpath!\exiftool" -XMP:Subject="!tags!" "!imagenameonly!!extn!"
  35.  
  36. echo. ----------------------- !foldername!\!imagenameonly!!extn! ----->>"!batpath!\log.txt"
  37. "!batpath!\exiftool" -XMP:Subject -a "!imagenameonly!!extn!" >>"!batpath!\log.txt"
  38.  
  39.     )
  40.  
  41.     del *.*_original
  42.  
  43. cd /d !batpath!
  44.  
  45.  
  46. )
  47. )
  48.  
RAW Paste Data