|
Answer» Hi,
I'm trying to create a BATCH file to rename all jpg images in a specified directory and add NEW names in file. new NAME should be the path for the image (with replacing each \ by $) concatenated with image name.
this is the command I added and save in test.cmd, but it is not working
echo off & for /R "C:\Users\pc\Desktop\testing" %%A in (*.jpg) do set name2=%%A & set %name2:\=$% & rename %%A %name2%GIVE this a burl:
Code: [SELECT]echo off setlocal enabledelayedexpansion for /R "C:\Users\pc\Desktop\testing" %%A in (*.jpg) do ( set "name2=%%~pnxA" ren "%%A" "!name2:\=$!" )
|