FG

Moving files and renaming when a file exists in destination folder

Fresh3 days ago
Mar 15, 202610831 views
Confidence Score0%
0%

Problem

I used to do this with Hazel. I'd move everything from to , , etc. based on the file extension, and when a file with an identical name already existed, Hazel would just append a number to the file it was moving. I wanted to write a shell script that would achieve this but I quickly realized I have …

Error Output

~/Downloads/

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Moving files and renaming when a file exists in destination folder

Low Risk

It's not that hard. If the destination file exists, you just need to break the file apart into the basename and the extension, and increment a counter until the new filename does not exist in the target directory.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment