How to delete all of a certain file type in a directory

  1. Introduction
  2. Command Prompt
  3. The Command
    1. Note
  4. Running the command
    1. Note
  5. Tl;dr

Introduction

So you have a folder with let’s say, 1000 pictures with duplicates, maybe your camera was taking JPG photos and RAW photos, but you only want to keep the RAW ones, how do you go about deleting them all without having to click them all? Well in this post I will be showing you how to do just that, delete all files of a certain type in a directory.

Command Prompt

First things first is you will need to open Command Prompt as an Administrator and navigate to the directory that has the files, we have a guide on that here, but all you need to do is type ‘cd file/path‘ where file/path is the whole path to the folder e.g. C:\Users\TestUser\Pictures.

The Command

Now for the purpose of this post I’m going to be deleting Word documents but this can easily be changed to delete any file type, such as the JPG’s in the scenario above.

The command you will need is ‘del *.docx‘ where docx is any file type that you want to delete. We may also want to throw some switches in there too such as:

  • /s which deletes specified files from the current directory and all subdirectories. It also displays the names of the files as they are being deleted.
  • /f forces the deletion of read-only files.
  • /q specifies quiet mode, you won’t get a confirmation prompt when deleting the files.
  • /p asks you for permission before deleting each file, useful if you’re not too sure what you want to delete.

All information on these switches is from the Microsoft website.

So your command might look something like this ‘del *.docx /f /q

The asterisk is a wildcard so it will delete anything in the specified directory with the file type of ‘docx‘.

Note

You can use the wildcard listed above with the ‘dir‘ command to list all of the files that will be deleted before you commit to deleting them, it would look a little something like ‘dir *.docx‘ where docx is any file type you wish to find.

To show an example of the dir command with a wildcard in it.

Running the command

So I’ve spoken about all of this stuff, how about we put it into action?

Here are the Word files we want to delete:

We run the command ‘del *.docx /f /q

Voila! All of the docx files have been deleted but not the PDF that was in there.

Note

If we add the /s switch to the command then it will list the files that have been deleted like so:

Example of the del command with the /s switch to show file names.

Tl;dr

Run the command ‘del *.filetype‘, from the directory the files are in.

Filetype is the file type you wish to delete and then add your preferred switches e.g. ‘del *.docx /s /f /q

How to clear Microsoft Teams cache

  1. Introduction
  2. For Windows
    1. Close Teams
    2. App data
    3. Delete the files
  3. For Mac
    1. Close Teams
    2. Terminal Command
  4. Tl;dr
    1. Windows
    2. Mac

Introduction

Are you having an issue with Teams taking up a lot of space on your profile (or as a member of the IT team, taking up space on a lot of your users profiles?) then you may want to try clearing the Teams cache. It’s an easy task so let’s jump straight into it.

For Windows

Close Teams

First things first you need to make sure Teams is closed properly, so go to your tray in the bottom right of your taskbar and close teams by right clicking it and selecting ‘Quit‘.

The quit option when right clicking Teams in the tray in your taskbar

App data

Now you’ve quit Teams we need to head over to your appdata, the quickest way for me to explain it to you is to press ‘Win + R‘ to bring up the Run window and enter ‘%appdata%\Microsoft\Teams‘. Press ‘OK‘.

Run window showing the location of Teams cache.

Delete the files

Once you’re taken to the above folder (Microsoft\Teams) you can safely delete all of the files and folders located inside. Now start up Teams again and be on your way!

For Mac

Unfortunately I don’t have access to a Mac right now to show you what to do but I can in fact tell you what to do!

Close Teams

Simply close Teams by right clicking it in the dock and selecting ‘Quit‘.

Terminal Command

Unlike Windows, you’ll be doing this via Terminal, so go ahead and open Terminal and type the following command:

rm -r ~/Library/Application\ Support/Microsoft/Teams

Press ‘Enter‘ on your keyboard and restart Teams, you’re done!

Tl;dr

Windows

Close Teams via the tray in your taskbar > Browse to %appdata%\Microsoft\Teams > Delete all of the files and folders in there and restart Teams

Mac

Close Teams by right clicking it in the dock and selecting ‘Quit’ > Run Terminal > run the command: ‘rm -r ~/Library/Application\ Support/Microsoft/Teams‘ and restart Teams

How to solve the Steam Summer sale 2022 riddles

  1. Meet Clorthax
  2. The clues
  3. Regular games
  4. Outstanding!
  5. Note
  6. Answers

This year Steam have included a little clue hunt along with their summer sale, for those of you who like collection logs I’m sure you will be doing it to get all of the free goodies!

Meet Clorthax

The clues

Each of the clues look something like this. Why didn’t I start on 1? Because my brain doesn’t work that quick! And besides, I had to notice the difference in the games so I could write this guide for you!

Clicking on ‘go find it!’ will take you to the relevant Steam game category.

Regular games

First you will need to go through all of the sub-categories found on the steam page

So below you will notice I’m taking a look at all of the games, nothing stands out right? That’s because none of them are the right games.

However do you notice anything different about the game below? … Notice the price! All of the games that are the answer to these clues have a different currency that makes them stand out!

Outstanding!

So all you have to do is go through each sub-category and scroll through the page, look for the odd priced game and click on it, voila! Onto the next.

Note

It might be worth mentioning you can make use of ‘CTRL-F’ in this situation and just quickly jump through all of the sub-categories as shown below however I’ve had mixed results doing it.

Answers

But I know you probably just want the answers so here goes:

  1. Guitar Billionaire
  2. Custard Castle Small Claims Court
  3. Bass Ain’t Bitin’ 2022
  4. Dead Seagull Zoo Magnate
  5. Actually…: Frankenstein’s Monster Edition
  6. It’s Probably Fine
  7. Help Get The King To The Toilet
  8. The Consecration Of Esthme
  9. Pro Poker Amateur
  10. Hold In Your Farts

Windows 10 won’t install .NET Framework 3.5

  1. Introduction
  2. Regedit
  3. Install .NET framework 3.5
  4. Tl;dr

Introduction

So you need to install .NET Framework 3.5 but your windows keeps throwing up an error? Luckily there is a fix so read on!

Regedit

First up you want to run Regedit as an administrator and browse to the below registry. Change the below registry to ‘0’ and then press ‘OK’.

Registry editor with location and registry to edit.

Once you’ve done this restart the machine.

Install .NET framework 3.5

Once your machine has booted up again you can head to optional features by pressing Win+R and typing ‘optionalfeatures.exe’, sign in with your administrator credentials.

Windows Optional Features box with .NET Framework 3.5

Now tick .NET Framework 3.5 and click ‘OK’, when it’s all done you can then revert the registry changes if you want to.

Tl;dr

Open regedit as an administrator > Open the registry ‘Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU’ and modify ‘UseWUServer’ > Change the 1 to a 0 and press ‘OK’ > Restart the machine > Go to optional features and install .NET Framework 3.5 > Revert changes in regedit if you want to

How to install an exe via Command Prompt

  1. Introduction
  2. Navigating to downloads
  3. Checking the switches
    1. What are switches?
  4. Installing the software
  5. Summary
  6. Tl;dr

Introduction

In todays post I will be showing you how to install a program via Command Prompt. This can also be setup as a bat file and used in conjunction with something like PDQ Deploy to install software remotely.

We’re going to assume you already have Command Prompt open and running as an Administrator, so the first thing you’re going to want to do is navigate to the file using the ‘cd‘ command or any other method of navigating to a directory using Command Prompt.

We cover some methods of navigating through Command Prompt here.

Checking the switches

Now you’ve navigated to the correct directory in Command Prompt you’re going to want to check the switches of the file you’re going to install, in this scenario we’re going to install Python because I already have it in my downloads, so lets check out it’s switches.

The command you need to run is ‘filename /?‘ where filename is the whole name of the file, so for me it is ‘python-3.9.13-amd64.exe /?‘.

Once this command is entered you should get a window pop up much like this one:

There are a few switches here, notice the ‘/quiet’ one, this is the same as ‘/silent’ so we now know we need to use ‘/quiet’ in our command as oppose to ‘/silent’, otherwise it won’t work. Now we have that let’s move onto the next step.

What are switches?

Switches are essentially modifiers that can be added to commands in Command Prompt to change how that command will run, e.g. in this example we will be using the ‘silent’ modifier so the software will install ‘silently’ (without any user interaction needed).

Installing the software

Now let’s actually get into this, the command we now need to type is: ‘python-3.9.13-amd64.exe /quiet‘. Of course yours may differ if you’re doing your own software so it will be something like ‘filename /command‘.

Once we run this technically nothing should happen, you might notice it working because your cursor may flicker or something might pop up in the taskbar/tray; but essentially because of the /quiet switch we used nothing should appear and (in my case Python) it should install itself.

Summary

That’s all there is to installing software via Command Prompt.

There are a couple of ways you can implement this in the workplace, for example you can create a bat file which you can then put onto PDQ, I have a few batch files like this which I use to install software remotely (there is a guide to creating a batch file here).

You could also copy the batch file onto a USB and go from machine to machine to install software that way, albeit not as efficient but I once had to do this.

An example of the text you would have in a batch file for this would be something like ‘C:\Users\username\downloads\python-3.9.13-amd64.exe /quiet’.

Tl;dr

Run Command Prompt as an administrator > navigate to the file > type the filename followed by ‘ /?’ as a command to find the switches > type the filename and any switch you want and then run it.

How to setup a Teams meeting via Outlook

  1. Introduction
  2. Outlook online
    1. Outlook calendar
    2. Setting up the meeting
  3. Outlook client
    1. Outlook client calendar
    2. Setting up the Outlook client meeting
  4. Tl;dr
    1. Outlook online
    2. Outlook client

Introduction

In todays day and age meetings are probably more than likely to be virtual, particularly after the pandemic. So in todays post I’m going to show you how to organise a Teams meeting through your Outlook Calendar and how to invite people to it.

Outlook online

Outlook calendar

The first thing you need to do is open up your Outlook calendar, if you don’t know how to do this then go to your emails and click on the calendar icon on the left of the screen.

It’s located under the 9 dots in the top left.

Once you’re in there, click on ‘New event‘ in the top left corner.

Setting up the meeting

Now that you’re in the new event setup, you can start to organise the meeting. The below images point out some of the important parts of the setup.

You must toggle the Teams meeting on otherwise it will just be a regular event, if it’s setup as a Teams meeting then people will get an invitation to the meeting and will be able to join it from their calendars.


Outlook client

And what if you’re using the Outlook client? Well that’s even easier as there’s an option for it in your calendar!

Outlook client calendar

Head to your calendar which is located in the bottom left of your Outlook client window.

The calendar is located at the bottom of your client.

Once you’re in there, there is a button at the top of the window that says ‘New Teams Meeting‘, click that.

The ‘New Teams Meeting’ in the top of the calendar.

Setting up the Outlook client meeting

Once you have the meeting window up, simply fill in the details such as the attendees, the date and time and a subject if you wish.

The Teams Meeting options.

Tl;dr

Outlook online

Go to your Outlook calendar > New event > enable the ‘Teams meeting‘ toggle.

Outlook client

Go to your Outlook client calendar > ‘New Teams Meeting

How to compress photo sizes using Microsoft PowerPoint or Word

  1. Introduction
  2. Note
  3. Insert the photo into Word
  4. Compress the photo
  5. Tl;dr

Introduction

You don’t feel like uploading your picture to a website that will compress your photo so you take a look at paint, nothing. Well luckily you can compress files using Microsoft Word or PowerPoint!

Note

In this post we will be writing the tutorial in Word, but this can also be done in PowerPoint if you’d prefer, the steps are the same!

Insert the photo into Word

Firstly you need to open up ‘Word‘ and click on the ‘Insert‘ tab, in the ribbon click on ‘Pictures‘. Browse to your photo, select it and click the ‘Insert‘ button.

Compress the photo

Next up now that the image is in Word, you need to select it and go to ‘Format‘ under ‘Picture Tools‘ along the top. Inside of there click on ‘Compress Pictures‘.

When you click compress you will be given a few options, pick one that suits you. You can choose to compress all photos or leave it ticked to compress only the selected picture.

Choose the size of compression you’d like to do, the lower the PPI (that’s pixels per inch and not payment protection insurance so don’t worry!) the lower the size the image will be.

Note: The default resolution in Office is 220ppi.

Now you just need to copy and paste it into paint and save it in the required format you need! Note JPG is the go to choice as it favors lower file size over image quality.

Tl;dr

Insert the photo into Word/PowerPoint > select the photo > Under ‘Picture Tools‘, click ‘Format‘ > Click ‘Compress Pictures‘ > Choose your options > Copy and paste the image into Paint and save it in your chosen format.

How to remove the red grid from PDF’s when printing

  1. Introduction
  2. Open the PDF in Adobe Acrobat Reader
  3. Removing the Line Weights
  4. Tl;dr

Introduction

When printing a PDF, sometimes you might find that there is a red grid all over the pages that doesn’t appear when viewing the document. In this post I will take you through how to remove it.

Open the PDF in Adobe Acrobat Reader

So you’ve just printed out a document but you don’t really want the red checkered lines all over the pages, that’s okay. To remove them you need to open the PDF in ‘Adobe Acrobat Reader DC‘. To do this simply ‘right click‘ the file > ‘Open with‘ > Select ‘Adobe Acrobat Reader DC‘ and open your PDF that way.

An image showing how to open a PDF in Adobe Acrobat Reader DC.
How to open a PDF in Adobe Acrobat Reader DC.

Removing the Line Weights

When the PDF has opened in Adobe Acrobat, you need to go to ‘View‘ > ‘Show/Hide‘ > ‘Rulers & Grids‘ > Click on ‘Line Weights‘ to untick it.

An image showing An image showing the steps to turn off the line weights in Adobe that cause the red checkered grid to appear on printouts.
How to turn off the line weights in Adobe that cause the red checkered grid to appear on printouts.

And that’s it! As is shown in the image you can also just open the PDF in Adobe and then press ‘Ctrl+5‘ to turn off the line weights without having to go into the ‘View‘ options.

Tl;dr

Open the PDF in ‘Adobe Acrobat Reader DC‘ and press ctrl+5

Uninstalling TPM to fix BitLocker recovery boot loop

Image of BitLocker recovery when booting up a machine.
  1. Introduction
  2. Disable BitLocker
  3. Uninstalling TPM
  4. Re-enable BitLocker
  5. Tl;dr

Introduction

Further to our previous post on how to stop the BitLocker recovery boot loop, there are situations that may require a little more work to fix as oppose to simply decrypting and encrypting the drive again.

In todays post I will take you through uninstalling the TPM (Trusted Platform Module) driver and then re-enabling the BitLocker.

Disable BitLocker

Note: Because I’ve touched on this subject already, I won’t be showing you how to enable or disable the BitLocker in this post. Instead I will just be uninstalling the driver, if you’re not sure how to disable or enable BitLocker on your machine then click the links above to find out how.

Uninstalling TPM

Now let’s get into it! The first thing you will need to do is disable the BitLocker, once that has been done you will need to open ‘Device Manager‘ as an admin and look for ‘Security Devices‘.

Image of device manager showing the trusted platform module.
Image of device manager showing the trusted platform module.

In there you will find your ‘Trusted Platform Module‘, simply click that and then click the red cross at the top of the window to uninstall it.

Note: You may need to click ‘View > Show hidden devices‘.

Re-enable BitLocker

Now restart your machine and enable BitLocker. This should sort out any issues with the TPM data that may have become corrupt in some way causing you to have to enter the recovery key all the time.

Tl;dr

Disable the BitLocker, uninstall the TPM driver, restart and re-enable the TPM in the BIOS then enable BitLocker again.

How to stop BitLocker recovery boot loop

  1. Introduction
  2. Disable Windows BitLocker
  3. Enable Windows BitLocker
  4. End
  5. Tl;dr

Introduction

So you turn on your computer to find yourself stuck in a BitLocker boot loop, oh no! Don’t worry, it’s an easy fix providing you have the Windows BitLocker recovery key!

An image of BitLocker asking for recovery key.
An image of BitLocker asking for recovery key dell.

So windows is asking for a BitLocker recovery key every time you boot up your machine? Not a problem, the first thing you need to do is to unlock it by typing in the recovery key, this can be found depending how you saved it:

  • You printed it off.
  • You saved it to a file somewhere.
  • If you’re using Active Directory it’s likely it’s been setup so you can find it under the computer on there.

Disable Windows BitLocker

Assuming you’re in, the first thing we want to do is decrypt Windows BitLocker, you want to head over to ‘This PC‘ and ‘right click‘ your encrypted drive, ‘left click‘ on ‘Manage BitLocker‘.

Image of a file explorer window showing the Manage Bitlocker option.
A file explorer window showing the Manage Bitlocker option.

Once on the ‘BitLocker drive encryption‘ screen comes up, click on ‘Turn off BitLocker‘ to disable windows BitLocker drive encryption on your selected device.

Image of Bitlocker drive encryption to

Now you just need to confirm you want to deactivate Windows BitLocker by clicking on ‘Turn off BitLocker‘.

Image of BitLocker Drive Encryption asking if you want to turn off BitLocker.
BitLocker Drive Encryption asking if you want to turn off BitLocker.

Simply wait for the drive to decrypt.

Image of BitLocker Drive Encryption decrypting drive to turn off windows BitLocker.
BitLocker Drive Encryption decrypting drive to turn off windows BitLocker.

Enable Windows BitLocker

Note: Before this step, I would recommend booting into your BIOS and enabling ‘TPM‘ (Trusted Platform Module), it will likely be in the ‘Security‘ tab.

Afterwards we want to enable Windows BitLocker, you will first need to go back to ‘This PC‘ like you did at the start of the guide, right click the drive you want to encrypt and click ‘Turn on BitLocker‘.

Image of a file explorer window showing the turn on Bitlocker option to enable Windows BitLocker.
A file explorer window showing the turn on Bitlocker option to enable Windows BitLocker.

Next you will be taken through a number of settings pages, you will want to choose the options based on your requirements.

When it comes to backing up the recovery key I would recommend saving it to a file and saving it somewhere secure. Furthermore when choosing how to unlock your drive at startup, I have decided to go with the bottom option ‘Let BitLocker automatically unlock my drive‘ as it is what we use here, it uses TPM to unlock the machine automatically.

  • Image of BitLocker Drive Encryption asking how you would like to unlock your drive at startup.
  • Image of BitLocker Drive Encryption asking how you want to backup your recovery key.
  • Image of BitLocker Drive Encryption asking how much of your drive to encrypt.
  • Image of BitLocker Drive Encryption asking which encryption mode to use.
  • Image of BitLocker Drive Encryption asking if you're ready to encrypt the drive.
  • Image of the BitLocker drive encryption setup.
  • Image of the Bitlocker Drive Encryption screen with the TPM options.
Image of BIOS asking for confirmation to enable, activate and allow creation of an operator authentication value.
Image of BIOS asking for confirmation to enable, activate and allow creation of an operator authentication value.

If you get the two screens that I mentioned you might not get, you will likely get this screen after restarting it, simply press F10 to enable and activate TPM.

End

And that’s all there is to it! Not only have we covered BitLocker enabling, we’ve also covered how to disable it which will sort out your computer when BitLocker keeps asking for recovery keys!

If this post doesn’t help, we have another post here that might help!

Tl;dr

Disable the Windows BitLocker encryption, let it decrypt, then restart the machine and re-encrypt the drive by enabling BitLocker.

A bunker full of tech tips and guides!