One Newbie's Guide to Handling Obfuscation and Flattening

There is no such thing as a stupid question here as long as it pertains to using NewsBin. Newbies feel free to get help getting started or asking questions that may be obvious. Regular users are asked to be gentle. :-)

Moderators: Quade, dexter

One Newbie's Guide to Handling Obfuscation and Flattening

Postby UPdown » Tue Mar 05, 2019 4:11 am

Full congrats to Quade et al who are doing their best to battle the mindless beast that is obfuscation. Better than 90 per cent successful by my count. But it still takes a bit of effort to root out that extra one in ten, mostly 7zipped versions inside of rars. But Quade does the BIG job of still getting the correct folder name. This three-click routine also flattens the tree, bringing all the files from the sub-folders to the top level.

After Newsbin does the job it's designed to do, I'm three button clicks away from having a nice and tidy list of files to shovel into FileBot (

First, I run the CleanNZBs batch file. It uses Sweep.exe (I found it at,36109.0.html), a utility that will repeat operations on each sub-folder from a starting point.

Code: Select all
cd C:\DLs\NZBdls
C:\apps\Utils\Sweep.exe del *.par2
C:\apps\Utils\Sweep.exe del *.nzb
C:\apps\Utils\Sweep.exe del *.jp*
cd C:\Newsbin\NZBs\Shez
del *.nzb /Q

Now, you have to be wary of changing this batch file to handle where you have you DLs from Newsbin and where you are keeping the Sweep.exe file and where your NZBs are kept. Modify above to reflect that. Obviously, the file switches to the drive and specific folder of the downloads. It sweeps through it and all of it's sub-folders to remove par2, nzb and jpg/jpeg files. Finally, it switches over to where the NZBs are kept by Newsbin and gets rid of them. Optional of course.

The Next button goes hunting for those maddening 7z files that remain with the obfuscated name.

Code: Select all
cd C:\DLs\NZBdls
C:\apps\Utils\Sweep.exe C:\apps\Utils\7zip\7z.exe x *.7z

This time, you sweep through the sub-folders looking for 7zip files to extract. You could just as easily do unzipping or unraring if you find you have that problem by adding another line like the second one. Personally, I find I don't want any leftover rar files doing any damage accidentally if uncompressed. If they got left over by Newsbin, check your post-processing filter in AutoPAR options. My DeepSix filter does away with Rar, NFO, URL and other detritus. Some gets through, but that's because I'm watching and when an Undownloadable file makes itself evident I abort that process. Sometimes everything doesn't clean itself up, which is why the occasional Rar file gets left over. They are easily spotted post my clean up routine.

Finally, an AutoHotkey script that brings everything to the top in tip-top shape.

Code: Select all
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.

TheFolder := "C:\DLs\NZBdls"
   JustDir := getDirName(thisDir)
   if  (JustDir <> "NZBdls")
   return SubStr(_path,InStr(_path,"\",0,0)+1)

You will have to handle changing the script to make TheFolder point to where you do YOUR downloading. In the tenth line comparison, make sure JustDir is compared to just the last folder in your folder path. This to avoid renaming files that are already collected into your root download folder and that you haven't gotten around to processing with FileBot yet. You compile the script and run it from a shortcut and you will be happy with the moving of your files, with 100 per cent un-obfuscated names, to your root download folder. You DO HAVE TO DELETE THE EMPTY SUB-FOLDERS. I leave it to you to modify the AHK script to do so. I found it easier to do manually.

Now, I created a small test tree to work out the script and, indeed, this is not version one of the script. More like version six. But once you have it just right, you can handle future variations of Obfuscation designed to bedevil Quade, but still be accessible to manual work. I've taken the manual out of the work.

Hope this helps the community.

NOTE: My file manager lets me see a flattened view of any sub-folder, so I do check before starting my post-processing. If, as with 90 percent of the downloads, Newsbin has left you with no problems, simply use the AHK script turned compiled EXE to flatten your files. It's not a perfect flatten, but close enough for me.
Active Participant
Active Participant
Posts: 67
Joined: Sat Dec 29, 2012 10:44 am

Registered Newsbin User since: 12/27/12

Return to Newbie Forum

Who is online

Users browsing this forum: No registered users and 2 guests