Posts Tagged ‘Coding’


You might want to read the previous articles before proceeding:
Part 1Need a Quicker way to backup DacEasy Data?
Part 2Choosing what DacEasy files to backup

are not familiar with running batch files in windows, please consider an alternative.

Create a new folder on your C:\ drive called dacBackup

Copy the following code into a new file called “dacBackup.cmd” and save it in the same folder:

:: First, I create a temporary directory to copy the data to.
md c:\dacBackup\DacEasy
:: Copy each of the individual modules from
:: their working directories to the temporary directory.
(xcopy C:\DacEasy\bc\profiles\DacEasyCompany1 C:\dacBackup\DacEasy\bc\profiles\DacEasyCompany1 /I /E /V /Y
xcopy C:\DacEasy\ac\DacEasyCompany1 C:\dacBackup\DacEasy\ac\DacEasyCompany1 /I /E /V /Y
xcopy C:\DacEasy\py\DacEasyCompany1 C:\dacBackup\DacEasy\py\DacEasyCompany1 /I /E /V /Y
xcopy C:\DacEasy\bc\profiles\DacEasyCompany2 C:\dacBackup\DacEasy\bc\profiles\DacEasyCompany2 /I /E /V /Y
xcopy C:\DacEasy\ac\DacEasyCompany2 C:\dacBackup\DacEasy\ac\DacEasyCompany2 /I /E /V /Y
xcopy C:\DacEasy\py\DacEasyCompany2 C:\dacBackup\DacEasy\py\DacEasyCompany2 /I /E /V /Y
) > C:\dacBackup\dacCopy.log
:: By enclosing the XCOPY commands in parenthesis, I
:: can create a single log file of every command within
:: the group. This logfile is created and saved as
:: “C:\dacBackup\dacCopy.log”
@echo off
:: Set Variables
set Today=%Date:~4,2%-%Date:~7,2%-%Date:~10,4%
set fileName=DacBackup
set dDay=%Date:~0,3%
set BackupFolder=C:\dacBackup
set BackupFile=%BackupFolder%\%fileName%(%dDay%)Full.bkf
set JobName=%Today% DacEasy Backup
set Description=DacEasy Backup %Today%
:: Back up Files and Shares
C:\windows\system32\ntbackup.exe backup “C:\dacBackup\DacEasy” /n “DacEasy Backup %Today%” /d “%Description%” /v:yes /r:no /rs:no /hc:off /m normal /j “%JobName%” /f “%BackupFile%”
:: Removes temporary directory
rd /S /Q c:\dacBackup\DacEasy

If you have trouble trying to copy and paste the code above, I have also provided the script for download in 2 different compressed file formats (ZIP and RAR):

 

I have been trying to organize my categories in WordPress a little better so that you can find things easier and so I have less trouble trying to figure out which ones to use when I write new posts.

I originally started using my name (Jason Stone) as a category, thinking that it would help me rank higher for my name. At first, it worked. I used to be on the first page when you would type “Jason Stone”. I think Google’s filter decided it didn’t like that idea because my rank dropped to 99. The other categories I deleted were:

  • Web Server
  • Hot
  • Funny
  • Blogging

If you have trouble trying to find something, try looking in “Cluttered Thoughts
I Added the “Cluttered Thoughts” for when I am in a hurry or if I post some random stuff that doesn’t relate to my main topics. I have also added the “Coding” category to organize articles that contain full scripts or source code snippets in any coding language that I end up needing to use (examples: ASP, PHP, HTML, etc…)

I moved the Databases Category from:
Root > Computer > Software > Databases
to:
Root > Databases

(This is the new location for “Databases“)

I moved the PHP category from:
Root > Computer > Software > PHP
to:
Root > Coding > PHP

(This is the new location for “PHP“)

 

I just downloaded the Simple Tagging 1.6 Plugin today and I got errors when I tried to convert the categories to tags on the import tags section. The following will explain the error, and how I fixed it. (I didn’t bother to do a search on this problem so someone else may have already posted a fix for it)
To be safe, I downloaded and installed the WordPress Database Backup Plugin and did a backup of the database before running the import tags function like it suggested.
So, once I got Simple Tagging installed, I clicked on the new “Tags” section then I clicked the tab labeled “Import Tags” and checked the “I’ve backed up my database” checkbox and clicked “Convert Categories to Tags.”
When I did that, it returned the follow error:

WordPress database error: [Unknown column ‘p2c.category_id’ in ‘on clause’]
SELECT cats.cat_name, p2c.post_id FROM wp_posts posts INNER JOIN wp_categories cats ON (p2c.category_id = cats.cat_id) LEFT JOIN wp_post2cat p2c ON (posts.ID = p2c.post_id) WHERE posts.post_status IN (‘publish’) AND posts.post_type <> ‘page’

To fix it, go to your simple-tagging folder (should be in the plugins folder) and look for “simpletagging.admin.php”