Solved Deleting mass files ending in specific characters

OK.

You've got about 30 songs listed. Of those, only one is OK as of now--the one that begins with 2am.

I assume the OK files not in any particular subdirectory that could be excluded from your renaming and that they are scattered across all directories?

I'd think you are going to have to separate the "OK" titles manually if you intend to use a file renamer program. This is because you DON'T have a consistently wrong pattern. In most cases, you want to shave the left side, but in some cases you don't.

If you can separate the OK files, then you can shave a single character from the left edge. A file incorrectly named 1jones.mp3 would then be jones.mp3 and would be OK. You'd then have to move jones.mp3 elsewhere.

Then shave another character off in a second pass. Now a file that began as 43Jones.mp3 becomes OK. Move it.

Continue shaving a character at a time.

If 95% of your files can be done this way, maybe you take the time to manually separate the other 5% (those like 2AM) so they wouldn't be affected. Or re-obtain them.

Some of those files are mp3. If the tags are good, you could use mp3Tag to force the file name to match the tag.

So, a file named 22jones.mp3 that had an artist tag of Dean Martin and a title tag of In The Misty Moonlight could be renamed to Dean Martin - In The Misty Moonlight.

I don't know if other file types such as m4a could be similarly renamed from tags or if they even have tags.

Someone who is really slick with programming may be able to whip up a custom script or something, but you are handicapped by the fact that SOME of your files are OK now. You don't want the script or a re-naming program to act on them.
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium SP1, 64-bitIntel Skylake i5-6600K, not overclocked8 GB HyperX DDR4-2666 (2 x 4 GB)none; graphics are integrated on CPU
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Ignatz Special; 4 speed manual gearbox; factory air conditioning; one of one
OS
Windows 7 Home Premium SP1, 64-bit
CPU
Intel Skylake i5-6600K, not overclocked
Motherboard
AsRock Z170M Extreme 4, micro ATX
Memory
8 GB HyperX DDR4-2666 (2 x 4 GB)
Graphics Card(s)
none; graphics are integrated on CPU
Sound Card
onboard: Realtek ALC1150; external: USB Behringer UF0-202
Monitor(s) Displays
Dell S2340M 23 inch IPS
Screen Resolution
1600 x 900
Hard Drives
System: Crucial MX100 series SSD, 128 GB;
Data: Samsung Spinpoint 103SJ, 1 TB;
Backup: WD Caviar Green WD30EZRX-00D8PB0, 3 TB
PSU
Rosewill SilentNight 500 watt fanless, semi-modular
Case
Antec Solo II
Cooling
Noctua NH-U12S; Noctua F12 intake, Noctua S12A exhaust
Keyboard
Microsoft 200 6JH-00001 USB
Mouse
Dell or Microsoft optical wired; USB
Antivirus
Microsoft Security Essentials and Malwarebytes Premium
Browser
Pale Moon
Other Info
All fans PWM; speeds at idle: CPU circa 500 rpm; intake circa 600 rpm; exhaust circa 600 rpm; CPU temps 27 idle and 47 C load in a warm room (27 C/81 F) when running Intel Extreme Tuning Utility stress test.
Gotcha, thats kinda what I figured.

Thanks for taking the time ignatzatsonic! I sincerely appreciate it!

COSenna
 

My Computer My Computer

At a glance

Windows 7 x6416gbNvidia 660M
Computer type
Laptop
Computer Manufacturer/Model Number
Asus G75VW BBK5
OS
Windows 7 x64
Memory
16gb
Graphics Card(s)
Nvidia 660M
Antivirus
Avast!
Browser
Chrome
Hi,

COSenna, did you end up fixing your initial problem of the @# suffix in filenames? I've attached a batch file that will help with that.

Preview:
Code:
@echo off
setlocal EnableDelayedExpansion

REM Delete all files with a filename ending with "@1", "@2" ... "@9".
REM And lob off "@0" from the end of a filename should it exist.

set file_masks="*.mp3" "*.m4a"
set should_recurse=TRUE
set should_overwrite_duplicates=FALSE
set WhatIf=FALSE

pushd "%~dp0"
if /i %SHOULD_RECURSE%==TRUE set recurse_switch=/s
if /i %WHATIF%==TRUE set echo=echo
for /f "delims=" %%I in (' dir /b %FILE_MASKS% %RECURSE_SWITCH% ') do (
	echo."%%~fI"| findstr "@[1-9]\..*$" >NUL && %ECHO% del "%%~fI"
	echo."%%~fI"| findstr "@0\..*$" >NUL && (
		set file_name=%%~nI& set file_ext=%%~xI
		set new_file_name=!FILE_NAME:~0,-2!
		if not exist "%%~dpI\!NEW_FILE_NAME!!FILE_EXT!" (
			%ECHO% ren "%%~fI" "!NEW_FILE_NAME!!FILE_EXT!"
		) else (
			if /i %SHOULD_OVERWRITE_DUPLICATES%==TRUE (
				%ECHO% del "%%~dpI\!NEW_FILE_NAME!!FILE_EXT!" /q
				%ECHO% ren "%%~fI" "!NEW_FILE_NAME!!FILE_EXT!"
			)
		)
	)
)
popd
 

Attachments

My Computer My Computer

At a glance

Windows 10, Windows 8.1 Pro, Windows 7 Profes...
Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Hi,

COSenna, did you end up fixing your initial problem of the @# suffix in filenames? I've attached a batch file that will help with that.

Preview:
Code:
@echo off
setlocal EnableDelayedExpansion

REM Delete all files with a filename ending with "@1", "@2" ... "@9".
REM And lob off "@0" from the end of a filename should it exist.

set file_masks="*.mp3" "*.m4a"
set should_recurse=TRUE
set should_overwrite_duplicates=FALSE
set WhatIf=FALSE

pushd "%~dp0"
if /i %SHOULD_RECURSE%==TRUE set recurse_switch=/s
if /i %WHATIF%==TRUE set echo=echo
for /f "delims=" %%I in (' dir /b %FILE_MASKS% %RECURSE_SWITCH% ') do (
	echo."%%~fI"| findstr "@[1-9]\..*$" >NUL && %ECHO% del "%%~fI"
	echo."%%~fI"| findstr "@0\..*$" >NUL && (
		set file_name=%%~nI& set file_ext=%%~xI
		set new_file_name=!FILE_NAME:~0,-2!
		if not exist "%%~dpI\!NEW_FILE_NAME!!FILE_EXT!" (
			%ECHO% ren "%%~fI" "!NEW_FILE_NAME!!FILE_EXT!"
		) else (
			if /i %SHOULD_OVERWRITE_DUPLICATES%==TRUE (
				%ECHO% del "%%~dpI\!NEW_FILE_NAME!!FILE_EXT!" /q
				%ECHO% ren "%%~fI" "!NEW_FILE_NAME!!FILE_EXT!"
			)
		)
	)
)
popd

Already tried. Some people just prefer third party apps. :/

However, I noticed you're using iTunes for your library. Since iTunes uses its own index, removing the files will not remove them from iTunes.

DO NOT REGENERATE THE LIBRARY. Most of the time, these duplicates are caused by iTunes preferences, which most are setup to cause this chaos by default. Regenerating the library from scratch could actually wind up causing more duplicates, and may not snag all the files. Instead, just create a smart playlist to remove them.

Here's a pretty helpful guide on how to - Find and Sort the Missing "Exclamation Point" Tracks in iTunes

You can also do this i'm sure with third party apps, but even the third party app supporters would likely agree this is easier.

Best of luck, and hope you solved the issue.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel i7 975 ExtremeCorsair Dominator 24GBEVGA Nvidia GeForce GTX 760
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
Intel i7 975 Extreme
Motherboard
EVGA X58
Memory
Corsair Dominator 24GB
Graphics Card(s)
EVGA Nvidia GeForce GTX 760
Sound Card
Onboard
Monitor(s) Displays
2 LG TVs
Screen Resolution
1920x1080 X 2
Hard Drives
256GB Samsung SSD 840 Pro (Sata III) - OS
240GB PNYXLR8 (X2 in R0 Sata III) - Games
64GB Kingston SSD (Sata II) - Plex Index
500 GB Hitachi HDD (Sata II) Music
1TB WD Green Series (Sata II) - Downloads
3TB WD Black Series (Sata II) - DVR
3TB WD
PSU
Corsair Silent Gold 1k
Case
Corsair 800D
Cooling
Swiftech Water cooled (CPU only) with x3 120mm radiator
Internet Speed
1Gbps (Google Fiber)
Antivirus
Windows Defender
Browser
Chome,Firefox,IE
Back
Top