I had a unique request to copy a list of folders out of a greater collection of folders. Seeking the best way to do this I found this solution thanks to sidesofmarch:

Step 1:

Create a text (ex: migrate.txt) file containing a list of folders to be copied or moved, each folder name on a new line.

Step 2:

Run a for/in loop while inside the Windows Command Prompt. Add the /move attribute to robocopy to move instead of copy. Google “robocopy” for more options. In this example %i is the folder name which copies it to the root of E: drive.

for /f "delims=" %i in (migrate.txt) do robocopy "%i" "E:\%i" /e /z /MT /log+:log.txt

Note: if you put this command in a batch file use %%i instead of %i

Tested 7/29/2015 on Windows 10

If you didn’t get ColdFusion 11’s (and probably 10’s) ODBC Server and Client services installed but end up needing them you can create a simple ColdFusion script to get it installed.

adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("{CF Admin Password}","{CF Admin User}" );

July 2nd 2015 marked Adobe ColdFusion’s (then Allaire’s ColdFusion) 20th birthday. Starting back in 1997, I have made a living programming in ColdFusion for about 17 of those years (I took off a year while fixing computers instead).

End of Junior year in high school I decided to look for a job. I’ve worked here and there for my grandfather in the music sales industry and my father in the HVAC industry.

I was intrigued by what was BBS systems and the Internet and made some super simple web pages with what would be now considered super annoying JavaScript. I believe it was my friend Gabe Spargen who turned me on to JavaScript because I couldn’t let his website be “cooler” than mine. This turned into the counseling department to have me set up their department website which consisted of a bunch of links and information for applying to colleges. I remember the cool factor being a select box that would take you to a link upon selection. In the end though it was “too advanced” and was converted to standard links.

Even before all that back in grade school days I’d find my way onto any BBS system that I could and even learned some PC Q-Basic and Apple IIe BASIC.

Taking my tinkering I started looking through the yellow pages for potential employers. At this time I was just looking for something in the computer industry. As happen I dialed the wrong number and reached David Shaul with “Practical Computer Concepts” known as “PCC”. He had me come on in for an interview.

Read the rest of this entry »

Seeing that someone was trying to hit wp-login.php (WordPress login) a few times a minute on one of our servers at CF Webtools we decided to block any PHP requests since this is a ColdFusion server. It wasn’t as easy as I thought. This is a Windows 2008 R2 server running IIS 7.5 and ColdFusion 11.

Sample URL:

At first I tried using Request Filtering under the “Rules”, “URL” and “Query Strings” tabs. These had no effect.

I then went to URL Rewrite where there was a custom rule to allow index.cfm to be absent from the URL.

        <clear />
        <rule name="Rewrite FW/1 SES index.cfm">
            <match url="^(?!css|js|fonts)(.*)$" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{REQUEST_URI}" pattern="^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml|ttf|woff|eot)([/?].*)?$" negate="true" />
            <action type="Rewrite" url="/index.cfm/{R:1}" logRewrittenUrl="true" />

I then tried adding a rule using the default settings of wildcards. While the test responded okay, the actual page kept processing the URL.

Thanks to Wil Genovese, after switching the regular expressions and enclosing those in parenthesis, “.php” requests were finally denied.

<rule name="No PHP" stopProcessing="true">
    <match url="(.*)" />
        <add input="{PATH_INFO}" pattern="(\.php)" />
    <action type="AbortRequest" />


“What is the best IDE for CFM”

Posted: February 11, 2015 in ColdFusion
Tags: ,

I run into the question “What is the best IDE for CFM” here and there. So I thought I’d post my response here as well for others to find:

I personally use ColdFusion Builder and Sublime Text 3 for my projects at CF Webtools.

There are only two IDE’s for ColdFusion: ColdFusion Builder and IntelliJ IDEA. An IDE, as opposed to a code editor, has the ability to communicate with a ColdFusion server instance and debug your code. It can also introspect your code, offering code hints based upon what your code is doing.

  • ColdFusion Builder is actively updated. Versions 1 and 2 had massive footprints that really turned me off. I have found that version 3 is much faster and therefore I find much more useable than the previous two.
  • IntelliJ IDEA has stopped ColdFusion updates from what I’ve read and does not list ColdFusion as a supported language. I do understand that what used to support CF was only the Ultimate Edition. Though Roger commented that he saw a ColdFusion update on February 3rd. I’ve never used this product so it’s hard for me to have good info here.

Everything else is just a code editor such as SublimeText, Brackets, CF Eclipse, and NotePad++. A code editor, as opposed to an IDE, does not debug or introspect your code. All are good products (I really like SublimeText). But none of them keep up to date with ColdFusion language enhancements and again they are not IDE’s.

  • CFEclipse might be the most recent with their 1.4.6 release that “only” took 2 years to come up with.
  • cfbrackets for Brackets is still in Beta and hasn’t been updated since June of 2014. It also doesn’t support cfscript which is a huge negative for me.
  • The CF Plugin for Sublime Text doesn’t support CF11 and you can’t install it on ST3 via the package manager.

Then of course there are outdated code editors such as:

If you’re looking for a true IDE I would stick with ColdFusion Builder for the sole reason is it continues to receive ColdFusion updates. But then again “best” is subjective.

Update 3/11/2015 11:31 CST:

Microsoft has included the fix for AnyConnect and Windows 8.1 in the 3/10/2015 Windows Update. See KB #3040335

Update 2/16/2015 16:11 CST:

Per Cisco: Microsoft has released a fix-it patch providing a workaround for this issue. See KB# 3023607

When you visit the KB page, it appears you have to scroll down to the “Microsoft Fix It” button and install the AppCompat shim which is Microsoft Fix it 51033. This is a bit confusing, so be sure to click that button.

Microsoft is planning to include the fix with the Microsoft March Patch Tuesday release (subject to change)

I run Windows 8.1 and run Cisco AnyConnect Secure Mobility Client version 3.1.03103 to access a VPN.

Today, after I hit connect, it stopped working out of the blue with the error:

Failed to initialize connection subsystem

Thanks to ‘I Think – Therefore “IBM I”‘ blog I was able to quickly resolve the issue. I’m assuming this had to do with a recent Windows Update. Here’s the final solution:

  1. Close the Cisco AnyConnect Window and the taskbar mini-icon
  2. Right click vpnui.exe in the “Cisco AnyConnect Secure Mobility Client” folder. (I have it in “C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\”
  3. Click on the “Run compatibility troubleshooter” button
  4. Choose “Try recommended settings”.
  5. The wizard suggests Windows 8 compatibility.
  6. Click “Test Program”.  This will open the program.
  7. Close
  8. Some people may need to repeat the above steps for vpnagent.exe. That is the local service that supports the client user interface.

If you use group policies, Kim commented using the following for Windows 7 mode:

Make a GPO that added this key:

SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Valuename : C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe
Valuedata : ~ WIN7RTM
Update 2/11/2015 13:52 CST:

Cisco has notified me that they have escalated this issue to Microsoft for investigation.

This issue was introduced by KB# 3023607: Secure Channel cumulative update changes TLS protocol renegotiation and fallback behavior (https://support.microsoft.com/kb/3023607)

Included with Microsoft Security Bulletin MS15-009 – Critical Security Update for Internet Explorer (3034682)

This issue should also affect Windows 7 user with IE 11, but no reports of failure have been seen yet.

Update 2/12/2015 10:22 CST:

Cisco recommends that all customers open their own cases with Microsoft since the ultimate fix will need to come from them. You can feel free to reference Cisco’s case #115021112390273 in order to expedite having your ticket properly triaged by their support team. source

Our normal web server consists of a OS and Program File drive (C:) and a data drive to hold website files (E:). This provides an extra layer of security, speed and helpful structure. Sometimes we will also add another data drive (F:) for clients with really large storage needs. For example all user uploaded photos goes onto a 2TB drive array.

So let’s say you have user upload photos dedicated to one drive. You may want to just place the data onto the root of the drive. Simple right?

Well here’s what you may run into: When migrating/copying that drive to a new drive/machine using Robocopy you’ll find a few issues: (robocopy \\OLD-SERVER\UserPhotos F:\Data\UserPhotos /e /copy:DT /MT:8)

  1. If you’re putting the data into a subfolder this time, that root subfolder will become a system-hidden folder. The reason is you are copying the root of a drive. Pretty annoying.
    1. You can fix this by running this after the copy starts: “attrib -H -S F:\Data”
  2. It will try copy “System Volume Information” and “Recycle Bin”. But you’ll find out that your process will just get stuck because it doesn’t have permissions to do so.
    1. You can fix this by not copying any system or hidden files/folders:
      “robocopy \\OLD-SERVER\UserPhotos F:\Data\UserPhotos /e /copy:DT /MT:8 /xd $Recycle.bin “System Volume Information”” FYI: I tried using “/xa:HS” instead of the /xd, but that didn’t work as expected.
    2. If you’ve already gone 8 hours into your copy operation just to find this out, speed things up by syncing things instead using: “robocopy \\OLD-SERVER\UserPhotos F:\Data\UserPhotos /mir /copy:DT /MT:8 /xd $Recycle.bin “System Volume Information” /xo /fft”

So my point is, don’t put your data folder/file structure in the drive root. It’ll get mixed up with hidden-system files and folders and one day throw you for a loop. Instead put that all in a subfolder such as “F:\data”. Another example might be “E:\websites”.

Side-note: There are other copy methods to avoid this situation, however Robocopy is going to be one of your fastest options.