i have a pictures in a folder with the similar names but different extension
2008.03.13__20.53.49__DSC_3020.NEF
2008.03.13__20.53.12__DSC_3018.jpg
2008.03.13__20.53.12__DSC_3018.NEF
I need to move .JPG files that have corresponding .NEF into a subfolder called "jpeg duplicate of NEF" i have been using a such script on Windows
chcp 1252 >NUL
color A
if exist "jpeg duplicate of NEF"\ goto :move
if not exist "jpeg duplicate of NEF" mkdir "jpeg duplicate of NEF"
if errorlevel 1 (
echo Error create "jpeg duplicate of NEF"
goto :end
) else (
echo ......Directory created jpeg duplicate of NEF......
)
:move
for %%I in (*.jpg) do if exist %%~dI%%~pI%%~nI.NEF move "%%I" "%%~dI%%~pIjpeg duplicate of NEF\"
:end
echo ____________jpeg duplicate to folder, NEF leave in main folder____________
pause
But now i'm using MacBook and would like use similar script as a quick action. (i think it has to be bash script?) Can you help me with this please?
