Replacing underscores with fullstops / dots

Come up with a useful post-processing script? Share it here!
Post Reply
GrantR
Newbie
Newbie
Posts: 14
Joined: September 8th, 2008, 8:42 am

Replacing underscores with fullstops / dots

Post by GrantR »

As you may be aware of, some website rename all their nzb files to replace normal releases with spaces instead of fullstops/dots. Sab allows you to replace them with underscores but i kept finding myself renaming them with .'s and the subsequently a - before a grp name for instance. While i haven't solved this entirely, my tiny batch script just replaces "_" with "." resulting in less work for me!

If you like the sound of this just stick this at the start of a current .bat script or create a new file like something.bat and place it in the scripts dir in Sabs install dir.

@echo off
echo.
echo [gReplace] Replacing all underscores
set oldname=%1
set newname=%3
set newname=%newname:_=.%
ren %oldname% %newname%




Note: This script only works if you have checked "Replace spaces in foldername" in Config, Switchs.

-gR
Post Reply