I created a folder icon with two outlined shapes and combined them and also converted to outlines. I want to now subtract from the right side of the folder. However, every time I try to subtract, it gives me weird outlines. The first image is how I want the final icon to look like. The second image shows what happens when I try to subtract from the folder shape.
I don't use Sketch, but if it's like other vector image editors, then it looks like the folder is in fact a single path with a thick stroke.
So, you need to convert the stroke to a filled shape made up of paths (called Expand in Illustrator, or Stroke to Path in Inkscape). Looking it up on the internet, the equivalent seems to be Layers > Convert to Outlines in Sketch, although I'm not entirely sure if that's right. Perhaps a Sketch user can confirm this.
If you don't convert the stroke to outlines (or paths) first, then when you do the Boolean command, it will only cut into the stroked path.