100k+ files suffixed with "-Copy(#)" added to folder, Duplicates

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
naksatraja
New here
Posts: 4
Joined: Mon Aug 03, 2020 7:18 am

100k+ files suffixed with "-Copy(#)" added to folder, Duplicates

Post by naksatraja »

Not sure what happened but I created a new folder, moved 10% of files to this 2TB folder and noticed that doing it via LAN was going very slow so I stopped transfer and copied everything to a USB drive that I directly plugged to NAS and copied over (much faster) via direct USB.

Somehow when I am downloading the Folder down to my PC, it has added a LOT of files with "-Copy(1)" or (2) files causing a massive issue with duplicates. I tried to use Windows File Explorer to Search "-Copy(1)", which found over 100k files with this suffixed on the end of the filename and delete all the items found but it doesnt seem to be doing anything so I now think I should do it directly from the QNAP Web File Explorer but with a 500 item limit I keep getting a "Search Timed Out", this is going to take ages, Is there an alternate way to do this? Just need to find all the files with this added suffix and delete them.
naksatraja
New here
Posts: 4
Joined: Mon Aug 03, 2020 7:18 am

Re: 100k+ files suffixed with "-Copy(#)" added to folder, Duplicates

Post by naksatraja »

Might be a dumb question to ask here but I think I figured out that I should probably do this via SSH.
My only issue is I cannot navigate to the Volumes I created starting from homes/ because all the volumes end with a @ sign and it keeps saying no such directory when I try to "cd Volume@"
Last edited by naksatraja on Thu Mar 30, 2023 2:08 pm, edited 1 time in total.
naksatraja
New here
Posts: 4
Joined: Mon Aug 03, 2020 7:18 am

Re: 100k+ files suffixed with "-Copy(#)" added to folder, Duplicates

Post by naksatraja »

Figured it out
viewtopic.php?t=135160#p632840
then I used
find . -type f -name "*-Copy(1)" -exec rm {} \;
Post Reply

Return to “File Sharing”