How to change a folder icon to a picture in Mac OS X

In an earlier post I showed how I set my screenshots to save in a custom folder rather than onto my desktop (I seem to take a lot of screenshots). I also shared a little camera icon that I made for it. One of the comments asked how I changed the folder icon, so I’ve made a 30 second screen recording to show how.

1. Go to web page that has the image you want
2. Right click image (or ctrl + left click)
3. choose Copy image
4. select folder you want to change the icon for (single left click the folder)
5. Press cmd + i keys together (opens the info pane)
6. left click folder icon shown in the top left of the info pane (it will get a blue highlight border)
7. Press cmd + v keys together (this is the shortcut for paste). You’ll see the image will have replaced the folder icon.

VMware consolidated backup missing a catalogue file – fixed!

As always seems to be the case, a routine update of server software becomes a problem. This time it was updating VMware ESXi from 4 to 5. I know, I’m a little behind the times, but it was working, and it’s only a small office server… and I should have left it alone, sigh.

So, shutdown the Virtual Machines, overnight copy them all over the network to my laptop and a handy external disk. – Done.
Note: I probably should have used the VMWare standalone converter to copy them, rather than just copy them direct from the datastore.
This morning, in at 8am, install the new ESXi (having lost two hours ’cause the DVD on the server was playing up).

Start restoring the Virtual Machines. First a non important one… all good

Second, the most important one, our file server…. uh oh.

"The VMware Consolidated Backup source ... has a missing catalog file."

Several hours of trying to fix it, editing files trying different versions of the VMWare standalone importer (which may have helped, I’m not sure),
I solved it by Opening the Virtual Machine in VMware Player,
which spotted the problem (I had the VM disks split across two datastores but I’d saved them into one folder), asked me to tell it where they were, and that fixed it for VMware player, which also meant the importer was happy again.

PS – I also realised why I never upgraded from VMware ESXi 4. Version 5 takes away a lot of the essential functionality from the vSphere software. That makes ‘it not a lot of use’ for me. Still, it was free. So having fixed the import, I’m now waiting to import it back to a fresh install of version 4. At least I finally set up the 3+1 raid 5 (instead of the 2 sets of raid 1 left over from the original disks and an upgrade 2 years ago).

A quick note on my first steps using stripe.com

I’m building a web site for a charity that needs to take credit cards for tickets being sold. I’ve chosen to use stripe.com as:

  • It’s simple to implement
  • They take care of all the security and PCI DSS (I never get any card details to save, that’s a good thing).
  • It’s not expensive (compared to other options like having a merchant account for the charity).
  • I couldn’t get away with using existing services (eg: eventbrite, picatic, etc)

Users don’t have to register on this charity site (essentially it’s selling a one off event ticket) so my process is:
1) Vistor completes form and submits [let's call it 'Registration']
2) Server validates form (email address present, other information entered, etc)
3) Server sends page with Stripe pay now button. That button contains the code to precomplete some of the stripe form (eg: the email address).
4) Vistor clicks stripe button, enters card details which are sent direct to the stripe server (ie: not through my server)
5) stripe returns a ‘token’ that can be used to charge the credit card and visitor is directed to my ‘charge’ page with their token (sent as a https post request).
6) when my /charge page is requested, My server can request the card is charged using the single use stripe token. Then thank the customer for paying.

I wanted to record the payment as processed against my Registration_ID, and thought I would be able to use the browser session to link the stripe request with a specific registration. It didn’t work, every test transaction came back with nothing in the session. It was as if the session was being refreshed every time a Stripe transaction occurred.
After several hours of frustration, I tracked it down to rails built in CSRF protection.
As the post form is coming via Stripe, it won’t read the session cookie from the browser and resets it.

All I have to match the registration record with the stripe transaction is the visitors email address. This obviously causes problems if:

  • A visitor wants to buy more than one registration on the same email address
  • A visitor changes their email address during the stripe process (not easy for them to do, but possible).

However, it’s the best I’ve got so I’ll have to write some backup code to prevent two registrations on one email address (they’ll have to get in touch and pay another way) and raise an error if the email address that stripe got is different from the address in our records (the charity will have to match the records manually which isn’t difficult for such a small event).

Here’s the part in my dev log that help me find the problem, along with this blog post on kalzumeus.com.

Started POST "/registers/charge" for 127.0.0.1 at 2014-03-14 16:12:34 +0000
Processing by RegistersController#charge as HTML
Parameters: {"stripeToken"=>"tok_1234sometokendata", "stripeEmail"=>"asdf@asdf", "stripeBillingName"=>"CARDNAME", "stripeBillingAddressLine1"=>"asdf", "stripeBillingAddressZip"=>"ME13 9AB", "stripeBillingAddressCity"=>"Faversham", "stripeBillingAddressState"=>"Kent", "stripeBillingAddressCountry"=>"United Kingdom"}
WARNING: Can't verify CSRF token authenticity

A new form of Comment spam? – url shorteners and redirection?

This is interesting. This blog just had a comment which, at first glance, looked normal.

URL redirection can hide the destination, not always a good thing

URL redirection can hide the destination, not always a good thing

The link first runs through URL shortening service tinyurl.com.

That in turn redirects it to adfly (http://adf.ly) which is where it becomes interesting.
Example of an Adfly landing page
Adfly is an advertising system. Instead of linking directly to the destination, you link with a custom link from them. Before the visitor can go to the new page, they see an advert.
They can interact with that advert or click the big “Skip Ad” button at the top of the page.
If people click on the advert, whoever created the link gets a commission.

I don’t have a problem with Adfly. I’ve seen my son skip the adverts lots of times when he’s getting plugins for Minecraft. What I hadn’t seen before was this method of hiding the adfly link and as far as I know, it’s the first one posted on my blog.

Is it a problem?
I don’t think so, just an observation. It means I’m going to be less trusting of any url shortening from now on.

Is it an opportunity?
Not for me, at least not yet.
It would not be difficult for me to write some code that redirected all my off site links via adfly, including those posted in comments. It does mean anyone visiting and following a link would have an extra step to go through and I’d rather not do that readers.

I used to have google adverts on the blog but when I came to update WordPress I didn’t bother rewriting the templates or installing any plugins. The revenue it was generating was trivial.
I suspect Adfly revenue from this site would also be too small to be worth the effort.

BitDefender v Nod32

It’s anti virus renewal time! Not the most exciting job of the year, which is why I’ve been renewing for at least 2 years at a time.

Bottom line: So, after all my research, reading and testing, we’re sticking with Nod32 for another 2 years.

We’ve been Eset Nod32 customers a long time, but for this renewal a few warning signs meant extending the licence wasn’t the no brainer it has been in the past.
1) Their web site is way out of date. Here’s a screenshot:
why_eset
It’s November of 2013, so why are all these certifications dated 2006 to 2010?
2) Being pedantic when it comes to presentation of data, I read the claim of “ESET has won an unprecedented number of Virus Bulletin’s VB100 awards, more than any other security product” can also mean “We’ve been around years longer than everyone else, so we can say that whilst the new companies can’t”. It doesn’t tell me Eset are still leading the field and I’m sure they used to say they were the only provider with a 100% detection rate. They don’t say that now… maybe they’re not as good?

The big plus in their favour: The renewal price is cheaper than the new customer price. I like that. I hate it when companies give discounts to new customers but not existing, making me need to spend time switching supplier each year.

Despite the plus, it was time to do a little more research.

av-comparitives

I went through each month of reports on this site, as well as a couple of others. About 4 hours of study (yeah, I should get a life).
Result, ESET isn’t the leader any more. It may only be behind by a couple of percent, but going through several months of av-comparatives.org tests, they are now often a little behind. My fear, of course, is that one or two new viruses they mis in a given month is the one that gets into our network and causes mayhem [at this point, I am obliged to remind you to make sure you backups work, lest this latest virus called 'cryptolocker' destroy your files].

I looked at the new consistant leaders. I settled on the best alternative for our needs to be BitDefender. I wanted to try Kaspersky. Mostly because I admire their stance against a patent troll but unfortunately it’s a lot more expensive than Eset Nod32. Of course, I’ll regret that one day if we get a virus Kaspersky would have stopped, but in 6 months time it could be Kaspersky misses the virus Eset would have stopped. Hey ho!

I registered for the trial and at first, I liked it. I went for their ‘Cloud Security’ option, which as best as I can tell, is their ‘Small Business Pack’ (ie: regular PC Antivirus) but with a web based console for reporting and installing. I installed it on a new Windows 8 PC (Our first in the office, and I like Windows 8 a lot) and I love the console. It gave me a link to download the install which was super smooth (no licence ID’s to type in). It later told me that we have 7 other PC’s that aren’t running BitDefender (it searches the Windows network for machine ID’s and matches it to the machines BitDefender is installed upon).

Everything was great… until I got a virus. OK, not a real virus, the EICAR test virus file. It’s a small piece of text you can download to see if your virus scanner will detect it. Except. It didn’t. Or, I thought it didn’t. It immediately quarantined the file BUT DIDN’T TELL ME. So I did what any user would do, I tried again. I then decided the download function wasn’t working, so copied the text into a new text file, saved it, closed it – but it had disappeared. I then created the text file and left as .txt. Saw it on my desktop, renamed the file… and it disappeared.

Only then did I go and check the notification panel to see all these files were quarantined. So it’s good, it did it’s job, but it’s bad, because I didn’t know that. If one of our users has the same situation trying to read a customer’s .doc attachment, how are they to know what’s happened? It’s annoying.

So I put in a support request:

Issue: I’m testing bitdefender for our business. I tried the EICAR test file. Bitdefender spotted the file and moved it to quarantine. However there was no warning for the user (that the file they just downloaded was quarantined). The action was reported in the web console.Is there a setting that prevented a warning for the user or is this always the case (users don’t get told)

A few days having had no answer, I took to their product forums. The forums were pretty quiet. No one with a similar question to mine but it appears I wasn’t the only one waiting for an answer

bitdefender_forum

A whole 8 days later, I got an answer to my support email:

When running in Auto Pilot Mode, the product will take automatic actions for all malware and all information will be logged in Events.

The user will be notified via the Security widget that will display the number
of Events.

So, if you realise, you can open the widget and see what’s happened. It doesn’t pop up a warning. Until then, you’ll be clicking download wondering why nothing seems to be happening. Today, I also noticed a new warning “7 Days since last system scan” or similar. I don’t understand why BitDefender hasn’t just gone ahead and scanned if that is significant to the antivirus protection, I know Eset Nod32 does. Sure, a full scan can affect PC performance so make it happen when the processor is idle, or as a low priority background task.

I’ve only put one support request into Nod32 over the years we’ve had it, but looking back it appears to have been answered on the same day (with the solution, my further thank you reply 4 days later shows).

So, after all my research, reading and testing, we’re sticking with Nod32 for another 2 years.

Parallels virtual disk much larger on mac than windows is actually using

I’m using Parallels 9 on Mac OS X (Mavericks) to run Windows 7.
A couple of days ago I duplicated my Windows 7 virtual machine. Parallels spotted the duplicated machine when it started and offered to create a new MAC address. All looked good.

I uninstalled some software but Parallels was still using just as much disk space. Windows said it was using 64GB but Parallels and the folder size in Mac OS X reported 137GB. I wanted that free space back!

I searched the knowledge base but couldn’t find an answer. I then sent a long support request to Parallels complete with about 7 screenshots of various things and information that I thought might be related. Less than 12 hours later (great support!) they emailed back with the solution. Although I had no snapshots, it appears some snapshots from last year remained and that was what caused the problem. In case someone else is having the same problem, here is what they said:

[Parallels #1780846] Windows 7 Virtual Disk much larger in Mac/ Parallels than windows and can't reduce

Hi,

Thank you for contacting Parallels Desktop Technical Support and taking some time to explain with us the concern.

Based on the details that you shared with us. We would like to recommend some troubleshooting steps/article that might help us on solving the concern.

Please follow the advanced troubleshooting part of the article below.

>ERROR: Unable to delete the snapshot
http://kb.parallels.com/en/111736

Warning: We strongly recommend to create a backup copy of your Virtual Machine before applying the solution below!
Please take into account the size of virtual machine comparing to free space on Macintosh HD.
Once you created a backup copy, please proceed with the following:
1. Locate your Virtual machine in Finder
2. Right click on the *.pvm file of your virtual machine -> choose Show Package Contents
3. In Mac OS X, go to Applications > Utilities and launch Terminal. Type the following but do not execute:
prl_disk_tool merge --hdd
4. Drag the *.hdd file into Terminal and drop it right next to "prl_disk_tool merge --hdd ". In Terminal you will see something like this:
prl_disk_tool merge --hdd /Users/Username/Documents/Parallels/Windows\ 7.pvm/Windows\ 7-0.hdd
Note: There should be a space between '--hdd' and 'Users/Username...'
5. Press Enter/Return key to run the command and merge the snapshots.
6. At the same directory (inside Virtual Machine's bundle) delete Snapshots.xml file

Afterwards, please try to shrink the Virtual Hard disk size or compress it.

>Compressing the Disk
http://download.parallels.com/desktop/v9/ga/docs/en_US/Parallels%20Desktop%20User's%20Guide/33140.htm

Network PDF printing from Windows 8

Our small business is beginning the move from Windows XP to Windows 8. Moving to a new operating system is always a problem. There’s new things to learn, old systems that stop working together and many many hours of hair pulling on my part. It is progress though – I can’t imagine going back to Windows 98!

The biggest problem I’ve had is making our Network PDF printer work with windows 8. It’s based upon Ghostscript but there are no Ghostscript printer drivers for Windows 8. After two or three days of working through the problem, I’ve solved it.

Quick version:

  • Setup a CUPS printer service on a linux server
  • Have cups connect to our PDF Print appliance
  • Have the print appliance put the PDF on a new network share

Pros: We can generate PDFs (some have automatic letterhead backgrounds which I couldn’t do with CUPS alone)
Cons: It means having another print server set up to look after, It means users will no longer get their PDF’s by email (it will go to a new network share).

Long version:

Part 1 – The existing solution
For several years I’ve used YAFPC (Yet Another Free Pdf Composer). It is a self contained print appliance that runs as an instance on our VMWare server. I can’t remember what I paid for it, but it has been worth every penny. It is the sort of stable appliance that hasn’t needed to be updated for many years. It just works and I like that. Virtual Printers are created (A4_Blank, A4_On_Letterhead_Background, etc) and users can print to those printers.
The resulting PDF document is emailed to them as well as put in an automatic shared folder in their name on the appliance. It is controlled by a simple web interface. Behind the scenes, it’s a linux server and the print engine is GhostScript. It includes GhostScript print drivers for Windows XP and Windows 7 (and Mac) but Windows 8 has changed things and there is not yet (and may never be) a GhostScript print Driver.

Part 2 – CUPS (Common Unix Print System)
CUPS is a print server for networks that runs on unix like systems (Linux and Mac OS X included). There is a plugin called CUPS-PDF and my first thought was this would be all I need.

We already have a server running Ubuntu so I installed the packages (apt-get install CUPS CUPS-PDF) and set up a PDF printer. That was all pretty straight forward but it really only allowed for blank backgrounds – I couldn’t find a way of having a ‘letterhead’ printer as well as a ‘blank a4′ printer.

I reasoned in my mind that if I could print from Windows 8 to the CUPS server, I could probably forward the CUPS server to YAFPC PDF Printers. My logic was that CUPS would convert the print file in a way YAFPC/GhostScript would understand.

Part 3 – Connecting CUPS to the YAFPC

Through the CUPS web page admin:
Administration > Add Printer > [Other Network Printers | LPD/LPR Host or Printer ]
Connection = lpd://networkpdf/PDFLetterhead [alter that path to suit your printer]
Name/Description/Location as you choose,
Share this printer.

For the driver: Generic > Generic CUPS-PDF Printer (en)
worked for me, I assume any PostScript driver would work.
Finally > Add Printer.

You get to set a few defaults based on the driver you chose. EG: I could set the print resolution.

Part 4 – Changing some YAFPC settings
YAFPC normally recogises the windows user account name and makes some clever/customisable assumptions in order to email the PDFs to the user that printed them. It also stores them locally in a shared folder with the same name as the user. All very clever, but now the printing user is the CUPS user.
YAFPC lets you choose to store PDFs in an external storage location. I entered some credentials for a location on our Samba server (which happens to be the same server the CUPS service is running on).
Each virtual printer had to be updated to copy the file to the external storage.

Part 5 – Adding the network PDF printer to Windows 8

Open Control Panel
Tip: Try shortcut “[Windows Key] + I”
Add a Printer
Wait for network printers to be found, select the new network printer
You’ll see a warning “No driver found”, choose OK to locate one manually
Choose the driver “Generic” > “MS Publisher Color Printer”
This is a PostScript Printer driver. I assume any postscript driver will work (a lot of forum comments suggested HP drivers), but this worked for me first time so I’ve stuck with it.
Decide upon a printer name, Finish.

Print a test page to see it’s worked.
Win8PrintTestViaCUPSviaYAFPC

After Win 8.1 update display has shrunk

I’ve been setting up our first Windows 8 PC at work and working through all the bugs and gotchas a new operating system introduces to work.

Part way through the process the Windows 8.1 update happened and once rebooted there was a black border around the screen. AMD Catalyst wouldn’t start but windows reported the correct screen resolution being sent to the monitor. The monitor was fine when plugged into another PC.

I reinstalled the catalyst control centre (download from AMD) and started working through the settings to see if I could find the problem.

In Scaling Options (Digital Flat-Panel), the update had somehow corrupted the setting for underscan. I have a feeling that setting was wrong when I first installed the graphics card and drivers, so maybe the error is the AMD side rather than the Microsoft side.

Setting the scaling to 0% solved the problem.

catalyst_overscan

Caught in my spam trap – randrnews.co.uk

I’ve decided to start naming and shaming the people who spam me. I have an email address hidden in the code of one of my web sites. It doesn’t display to visitors but robots will read it. To give the spammers a sporting chance, the email address is nospam@….mydomain… I then email them to ask where they got the address from.

Their response to asking where they got the email address from?

They never responded.

Observations

Whilst this is the first time they’ve been caught in my current spam trap, scraping web sites and sending spam seems to be their method of operation to sell advertising space. They appear to have set up servers just to send spam. I say this because mhglobalmc3.co.uk doesn’t have a public website and displays a default virtual server login. They also run their own name servers. From an IT perspective, they seem pretty switched on – although their web server has been hacked so they’re not that good. I wouldn’t wish that on my worst enemy let alone spammers like this company. I’d email them and tell them, except I guess they wouldn’t read that either.

They are based in Kent, not so far from us, so back in 2009 I took the time to phone them and ask them to stop spamming us. I spoke to ‘Paul’ who promised to look into it. I’m assuming that was Paul Attwood. He was and is the owner of the domain sending spam back then;

Domain name:
    pamediasolutions.co.uk
 
Registrant:
    Paul Attwood
 
Registrant type:
    UK Individual
 
Registrant's address:
    47-48 Hawley Square
    margate
    CT9 1NY
    United Kingdom

Is the owner of the domain currently sending the spam;

Domain name:
    mhglobalmc3.co.uk
 
Registrant:
    Paul Attwood
 
Registrant type:
    UK Individual
 
Registrant's address:
    347a Margate Road
    Ramsgate
    Kent
    CT12 6SG
    United Kingdom

The destination, randrnews.co.uk, is owned by a dissolved company, MH Media Solutions Ltd of which Paul Attwood was a director. I guess they transferred it to a current company and forgot to tell the registry.

Domain name:
    randrnews.co.uk
 
Registrant:
    MH Media Solutions Ltd
 
Registrant type:
    UK Individual
 
Registrant's address:
    Lead Centre
    Dane Valley Road
    Broadstairs
    CT10 3JJ
    United Kingdom

randrnews.co.uk has a link to what I guess would be a parent company; http://mhmediaglobal.com/ except my browser wouldn’t let me visit;

Google Chrome Malware stop page

I’m beginning to the publishing industry like sending spam, seeing as Archant have started spamming again.

Email headers

Delivered-To: nospam@....
Received: by 10.76.88.49 with SMTP id bd17csp150210oab;
        Tue, 6 Aug 2013 06:01:27 -0700 (PDT)
X-Received: by 10.180.74.210 with SMTP id w18mr1934845wiv.20.1375794086684;
        Tue, 06 Aug 2013 06:01:26 -0700 (PDT)
Return-Path: 
Received: from plesk.mhglobalmc3.co.uk ([91.206.183.157])
        by mx.google.com with ESMTPS id f5si722923wjx.46.2013.08.06.06.01.08
        for 
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Tue, 06 Aug 2013 06:01:26 -0700 (PDT)
Received-SPF: pass (google.com: domain of ryan@refurb.mhglobalmc3.co.uk designates 91.206.183.157 as permitted sender) client-ip=91.206.183.157;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of ryan@refurb.mhglobalmc3.co.uk designates 91.206.183.157 as permitted sender) smtp.mail=ryan@refurb.mhglobalmc3.co.uk
X-No-Relay: not in my network
X-Antivirus-Status: Clean
Received: from ADVENT1 (host31-51-58-179.range31-51.btcentralplus.com [31.51.58.179])
	by plesk.mhglobalmc3.co.uk (Postfix) with ESMTPA id 244805968D1
	for ; Tue,  6 Aug 2013 14:01:04 +0100 (BST)
From: "Ryan Bunce" 
To: 
Subject: Editorial Opportunity
Date: Tue, 6 Aug 2013 13:53:45 +0100
Message-ID: <8a9e01ce92a4$e607b640$b21722c0$@refurb.mhglobalmc3.co.uk>
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="----=_NextPart_000_8A9F_01CE92AD.47D63060"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac6SkO5QeOa53URdSzqFQjxDYyR4CQ==
Content-Language: en-gb
X-Antivirus: avast! (VPS 130806-0, 06/08/2013), Outbound message
X-Antivirus-Status: Clean

This is a multipart message in MIME format.

------=_NextPart_000_8A9F_01CE92AD.47D63060
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_8AA0_01CE92AD.47D63060"


------=_NextPart_001_8AA0_01CE92AD.47D63060
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Description: Description: Description: Description:
cid:image001.jpg@01CE8A0C.A0729EB0


We are currently putting together the September edition of the Refurb &
Renovation News publication, which will for this issue have an added =
bonus
of an extra 5,000 circulation at the Grand Designs Live exhibition and =
the
100% Design show.

=20

I am tasked with closing off some of the editorial positions within this
issue and as I feel you would be really relevant for this I wanted to =
see if
you have something you would like to promote we could include.

=20

=B7        Exclusive total 63,000 Circulation=20

=B7        15,000 glossy A4 hard copies

=B7        48,000 Digital Versions of the publication

=B7        8 Week Circulation period (bi-monthly publication)

=B7        Media Partner with all the main UK Exhibitions

=B7        Extra 5,000 copies of this edition

=20

Specifiers that we target include;
Building Contractors - Builders Merchants - RIBA Registered Architects =
and
Large Architecture practices =96 Heating & Plumbing Engineers - BIID
Registered Interior Designers - Property Developers - Health Authorities =
-
Education Based Specifiers & Local Authorities.

=20

We run just 6 editorials per page giving you a good sized space with 1 =
full
colour image, 120-140 words of text as well as full company contact =
details.
I am currently able to offer you a 1/6th of a page editorial at =A395.

=20

Please respond by Wednesday 14th August at the latest if you would like =
to
take one of these positions.

=20

Best Regards

=20

Ryan Bunce

Sales Manager

Refurb & Renovation News

=20

Refurb & Renovation News   Suite 1, The Lead Centre, Dane Valley Road, =
St
Peters, Broadstairs, Kent CT10 3JJ  Tel: 01843 601705

Mac OS X Screenshot save to folder (instead of desktop)

I take a lot of screenshots on my mac.  Sometimes it’s simply the quickest way to save information from a web page or design I’m working on, sometimes it’s because I need to show someone what they should be seeing on their screen when I’m helping them with their computer by email.

Taking a screenshot is so simple on a mac.  Using the three key shortcut “Shift  CMD  4″ brings up crosshairs and you can draw the area of the screen that’s of interest.  Easy.  They’re saved to the desktop with the name ‘Screen Shot 2013-08-23 at 16.55.19.png’

Doing so many and not always wanting to delete them immediately was making my desktop a bit of a mess, so I googled for a way of changing where they’re saved. OS X Daily had exactly the answer I was looking for.

Launch Terminal and use the following syntax:

defaults write com.apple.screencapture location /path/

For example, if I want to have the screenshots appear in my Pictures folder, I would use:

defaults write com.apple.screencapture location ~/Pictures/

To have the changes take effect, you then must type:

killall SystemUIServer

So I created a folder on my desktop called ‘ScreenShots’, used the code
defaults write com.apple.screencapture location ~/Desktop/ScreenShots/

And it all works perfectly :-)

screenshot_folder_on_desktop
I wanted to make the folder look a bit different, so quickly created an icon for myself. It’s actually the “icon-camera-retro” from Font Awesome with a white gradient background inside the camera and transparent background. Sure, it won’t win any awards but if you want it, help yourself. Click on the image and you’ll get the standard wordpress image page with a download option (or right-click, save-as as you prefer).

ScreenshotFolderIcon