Page 1 of 1

Replacing underscores with fullstops / dots

Posted: January 16th, 2009, 6:21 pm
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