79665938

Date: 2025-06-14 15:10:34
Score: 1
Natty:
Report link

Here’s a clean and safe batch script that will move files from one folder to another, creating the destination folder if it doesn’t exist, and without overwriting existing files:

@echo off
set "source=C:\SourceFolder"
set "destination=C:\DestinationFolder"

REM Create destination folder if it doesn't exist
if not exist "%destination%" (
    mkdir "%destination%"
)

REM Move files without overwriting
for %%F in ("%source%\*") do (
    if not exist "%destination%\%%~nxF" (
        move "%%F" "%destination%"
    ) else (
        echo Skipped existing file: %%~nxF
    )
)

echo Done!
pause

Let me know if you need any help. Feel free to ask any question

Reasons:
  • Blacklisted phrase (1): any help
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: gardener jeffon