Windows Batch File to Remove Junk Files (.png, .txt, .srt, .nfo)

May 12, 2017 0 comments

Since I download a ton of different files I’m always left with a hard drive cluttered with a mess of junk files.

So I wrote up a Windows bat file that will scan a directory on my computer and remove the following junk files:

  • txt
  • jpg
  • nfo
  • png
  • gif
  • bmp
  • srt

You can easily add your own file extensions to remove.  This will also check inside of folders as well.

Here is the complete batch file code, please note you can also download this below.

OPTION EXPLICIT
DIM strExtensionsToDelete,strFolder
DIM objFSO, MaxAge, IncludeSubFolders

' ************************************************************
' Setup
' ************************************************************

' Folder to delete files
strFolder = "I:###Downloads"
' Delete files from sub-folders?
includeSubfolders = true
' A comma separated list of file extensions
' Files with extensions provided in the list below will be deleted
strExtensionsToDelete = "txt,jpg,nfo,png,gif,bmp,srt"
' Max File Age (in Days).  Files older than this will be deleted.
maxAge = 0

' ************************************************************

set objFSO = createobject("Scripting.FileSystemObject")

DeleteFiles strFolder,strExtensionsToDelete, maxAge, includeSubFolders



sub DeleteFiles(byval strDirectory,byval strExtensionsToDelete,byval maxAge,includeSubFolders)
    DIM objFolder, objSubFolder, objFile
    DIM strExt

    set objFolder = objFSO.GetFolder(strDirectory)
    for each objFile in objFolder.Files
        for each strExt in SPLIT(UCASE(strExtensionsToDelete),",")
            if RIGHT(UCASE(objFile.Path),LEN(strExt)+1) = "." & strExt then
                IF objFile.DateLastModified < (Now - MaxAge) THEN
                    
                    objFile.Delete
                    exit for
                END IF
            end if
        next
    next    
    if includeSubFolders = true then ' Recursive delete
        for each objSubFolder in objFolder.SubFolders
            DeleteFiles objSubFolder.Path,strExtensionsToDelete,maxAge, includeSubFolders
        next
    end if
end sub

Remove Junk Files Batch (51 downloads)

How To Bypass Samsung’s Bluetooth “Safe Audio Warning” (Tasker)

May 8, 2017 0 comments

I’ve been using Tasker lately for my Home automation as well as other Bluetooth connection profiles and more.  I’ve been working on a Tasker profile that integrates with my car’s bluetooth audio and features of my Smart home.  However when I would change the Bluetooth audio media volume pass (10+) I would get the “Raise volume above safe level?  Listening at high volume for long periods may damage your hearing.”  Please note I also achieved this on my stock Samsung Galaxy S8+ (not rooted).

What you will need:

Tasker

Secure Settings

Disable Safe Audio on Boot (52 downloads)

 

Steps:

Now that you installed the top (2) applications and downloaded the XML file from above.  The first step is to open up the Tasker android application.

At the top you should see “Profiles” you need to “Long Press” on this button so it brings up the import option.

Next click on “Import” so you can import the XML file you downloaded above.

If you have downloaded the XML from your mobile device it will most likely be in your “Downloads” directory.

So press the Back key and find the Downloads location.

Choose the “Disable_Safe_Audio_On_Boot.xml

That’s it!  So this will always Search for the High Audio Warning on Samsung devices and it will bypass it.

Here is the description of what this XML file actually does inside of Tasker:

Profile: Disable Safe Audio On Boot (16)
Event: Monitor Start
Enter: Anon (9)
A1: Wait [ MS:0 Seconds:30 Minutes:0 Hours:0 Days:0 ] 
A2: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: audio_safe_volume_state
Input Type: Int
Value: 2 Timeout (Seconds):60 ]

Streaming Bluetooth Audio in Nissan Pathfinder 2016 SV Model

May 2, 2017 2 comments

So I recently picked up a 2016 Nissan Pathfinder 2016 SV model.  One of the features it had was Bluetooth advertised; so I figured Ok it has Bluetooth media streaming capabilities built in.  I was upgrading the wife’s car from a 2013 Nissan Sentra which had it no problem.  After we got the car and hooked up Bluetooth I noticed it only had Bluetooth calling capabilities.  I Googled my issue and noticed several other people with the same problem.

I guess you need to purchase the higher end upgraded model or the Platinum edition which is about $15,000 more for the feature.  After I did some research I saw the car had on-board AUX / composite hookup’s as well as a USB port.

I tried (2) different methods:

Method 1:  This involved a USB Bluetooth wireless audio adapter and 2 x RCA Male, 1 x 3.5mm Stereo Female Connector

HIGHFINE USB Bluetooth Wireless Audio

Purchase for $8.69 on Amazon

2 x RCA Male, 1 x 3.5mm Stereo Female, Y-Cable 6-Inch

Purchase for $4.89 on Amazon

So this was the first method I tried because I figured it would be the easiest.  However the Bluetooth adapter just plain sucked it took about 3-4 minutes to connect the phone and was so inconsistent.  Also I noticed I would have to type the RCA hookup because when it moved the audio would fade in an out.  So I ditched that idea and check out my Method 2 below.


Method 2:  This is actually what’s pictured in the posts image.  It’s a little messy but I didn’t clean or zip tie anything up i just wanted you to see the initial setup.  This setup also does not require the USB port however it requires you to use your Cigarette lighter for power.  My wife likes to charge her phone in the car so I figured I would buy a Splitter so it would control both.

Kinivo BTC450 Bluetooth Hands-Free

Purchase for $34.99 on Amazon

NOCO GC020 12V 2-Way Splitter

Purchase for $8.95 on Amazon

2 x RCA Male, 1 x 3.5mm Stereo Female, Y-Cable 6-Inch

Purchase for $4.89 on Amazon

So this method worked the best and surprisingly it worked better than I expected it to.  My Smartphone instantly connected to the Kinivo BTC450 Bluetooth Hands-Free device every time without any delays.  What’s cool if you have both your phone connected to your Cars “Bluetooth Calling” and the Kinivo device it will pause your music and allow you to answer the phone call (this was a must).  What kinda sucks is that you cannot use the steering wheel controls to control the Next/Previous playback.  However on the Kinivo device were ever you decide to mount it has controls for Next-Previous-Stop-Play.


Setting Up Your Smartphone to Auto Stream

My next step was I wanted my device to immediately start playing Spotify when the Bluetooth connection was present.

You need to download Bluetooth connect & Play on your Android Smartphone Device.

Then you want to choose the Bluetooth device in this case mine was the BTC450 then I had it Auto Play spotify.  You can choose whichever media service you are using from Google Play Music, Spotify, etc.  There are several other applications that will accomplish this from:  Trigger Task LauncherAutoplay for Spotify  I’m still testing to see which application works the best and works all the time.  If you have any questions, tips or comments post below.