> ren 3278*.ext 4567*.ext work.
>
> The problem is for the different lenght from the original prefix and the new
> prefix.
> I have create a project mamed "co" (2 letters for example), and now I must
> change this whith 4567.
> ren co-*.ext 4567-*.ext
>
> change only the first file, en exit whith duplicate filename error.
If the new prefix is always longer than the old prefix, increase
the old prefix before replacing it with the new prefix:
lfnfor on
for %%i in (co-*.ext) do ren %%i aa%%i
ren aaco-*.ext 4567-*.ext
If the new prefix can also be smaller the the old prefix, remove
the old prefix before inserting the new prefix:
ren ??-*.ext " -*.ext"
lfnfor on
for %%i in (*.ext) do ren "%%i" %%i
for %%i in (*.ext) do ren %%i 4567%%i
:: in my batch programs, all batch compiler commands are lower case.
:: all FILENAMES and VARIABLES are uppercase.