_thumb ; _tiny ; _zoom ; _std
Example: image_thumb.jpg ; image_tiny.jpg ; image_zoom.jpg ; image_std.jpg ; image.jpg
Output: image.jpg should be moved to another Folder
Anyone care to share DOS Command prompt to achieve this

Thanks in Advance.
Moderator: DosItHelp
Code: Select all
@echo off
setlocal EnableDelayedExpansion
rem Define the list of parts of names to exclude
set numNames=0
for %%a in (_thumb _tiny _zoom _std) do (
set /A numNames+=1
set "exclude[!numNames!]=%%a"
)
for %%a in (*.jpg *.png) do (
set "filename=%%a"
set rightName=true
for /L %%i in (1,1,%numNames%) do (
for /F %%b in ("!exclude[%%i]!") do (
if "!filename:%%b=!" neq "!filename!" set "rightName="
)
)
if defined rightName move "!filename!" C:\other\folder
)
Code: Select all
if defined rightName move "!filename!" C:\other\folder