@echo off
set rootfolder=Project Folder
for /d %%a in ("%rootfolder%\*") do (
for /r "%%a" %%b in (*) do (
if exist "%rootfolder%\%%~nxb" (
call :duplicatefile "%%b"
) else (
move "%%b" "%rootfolder%\"
)
)
)
exit /b
:duplicatefile
set count=0
:loop
set /a count+=1
if exist "%rootfolder%\%~n1 (%count%)%~x1" goto :loop
move "%~dpn1 (%count%)%~x1" "%rootfolder%"
goto :eof
ASKER
FOR /R "C:\Project Folder" %%A IN (*.*) DO COPY "%%~fA" "C:\Destination"
~bp
Windows Server 2008 and Windows Server 2008 R2, based on the Microsoft Vista codebase, is the last 32-bit server operating system released by Microsoft. It has a number of versions, including including Foundation, Standard, Enterprise, Datacenter, Web, HPC Server, Itanium and Storage; new features included server core installation and Hyper-V.
TRUSTED BY
rd "%%~fB"
line, that was from a different question.
~bp