Code Samples Archives - Digital Tool Factory blog Code Samples Archives - Digital Tool Factory blog

The Digital Tool Factory Blog

A non definitive list of 64 html escape characters for currency

'Currencies on White Background' photo (c) 2011, Images Money - license: http://creativecommons.org/licenses/by/2.0/I recently had to integrate html escape characters for currency symbols on a project, and much to my surprise I could not find any good definitive list html escape characters for currency codes. These are also known as escape characters, character entities or extended characters.  I had to find them all more or less one by one.  Here is what I came up with. For some reason WordPress is not letting me post the escape characters as escape characters, so I have attached a simple text file containing a list of 64 html escape characters for currency symbols. Hopefully this will save someone else 45 minutes.

Here is what is in the file – it is in the Name – Abbreviation – Symbol format.

Australian Dollar – AUD – ₳
Barbados Dollar – BBD – $
Bulgarian Lev – BGN – л в
Bermudian Dollar – BMD – $
Brazilian Real – BRL – R$
Belize Dollar – BZD – $
Canadian Dollar – CAD – $
Swiss Franc – CHF – ₣
Chilean Peso – CLP – ₱
Chinese Yuan Renminbi – CNY – ₩
Colombian Peso – COP – ₱
Costa Rican Colon – CRC – ₡
Czech Koruna – CZK – Kč
Danish Krone – DKK – kr
Dominican Peso – DOP – ₱
Egyptian Pound – EGP – £
Euro Dollar – EUR – €
Fiji Dollar – FJD – $
British Pound – GBP – £
Guatemalan Quetzal – GTQ – Q
Hong Kong Dollar – HKD – $
Honduran Lempira – HNL – L
Croatian Kuna – HRK – kn
Hungarian Forint – HUF – Ft
Indonesian Rupiah – IDR – Rp
Israeli New Shekel – ILS – ₪
Indian Rupee – INR – ₨
Iraqi Dinar – IQD – Ű
Iceland Krona – ISK – kr
Jamaican Dollar – JMD – $
Jordanian Dinar – JOD – Дин.
Japanese Yen – JPY – ¥
Kenyan Schilling – KES – KSh
Korean Won – KRW – ₩
Kuwaiti Dinar – KWD – Дин.
Cayman Islands Dollar – KYD – $
Lithuanian Litas – LTL – Lt
Latvian Lats – LVL – Ls
Moroccan Dirham – MAD – MAD
Mexican New Peso – MXN – ₱
Malaysian Ringgit – MYR – R&:#77;
Norwegian Kroner – NOK – kr
New Zealand Dollar – NZD – $
Omani Rial – OMR – ﷼
Peruvian Nuevo Sol – PEN – S/.
Philippine Peso – PHP – ₱
Pakistan Rupee – PKR – ₹
Poland Zloty – PLN – zł
Qatari Rial – QAR – ﷼
Romania New Leu – RON – lei
Russian Rouble – RUB – р&#1091б
Saudi Riyal – SAR – ﷼
Swedish Krona – SEK – kr
Singapore Dollar – SGD – $
Thai Baht – THB – ฿
Turkey Lira – TRY – ₤
Trinidad and Tobago Dollar – TTD – $
Taiwan Dollar – TWD – $
US Dollar – USD – $
Vietnamese Dong – VND – ₫
East Caribbean Dollar – XCD – $
South African Rand – ZAR – R
Bahamas Dollar – BSD – $
Bahrain Dollar – BHD – $


17
Oct 13


Written By Steve French

 

How to fix problems with ReSharper LINQ Intellisense

The Problem

Resharper’s Intellisense, while generally awesome, does not find navigation properties in Linq statements

The Cause:

No Idea

The Solution

Switch back to Visual Studio 2012’s Intellisense, then go to Resharper > Options > Environment > General and make sure that the “Store Caches in the System Temp Folder

Close and Reopen Visual Studio 2012 and everything should be working well.


18
Oct 12


Written By Steve French

 

How to create a Cron job with MySqlDump, and use GZip Compression

'Wordpress cron file' photo (c) 2010, Harsh Agrawal - license: http://creativecommons.org/licenses/by/2.0/Full Disclosure: I am a long-term Microsoft Windows user and developer and I haven’t used any sort of Cron job in about 12 years, so all this was new to me.

What is a Cron job?

It’s just something that runs chronically, i.e. an automated procedure on the server that runs every day or hour.

What is MySqlDump?

It’s a nice simple way to do a backup of a MySql Database

What is GZip Compression?

It is the Linux version of zipping a file, using whatever open source algorithm they use.

How do Cron Jobs, MySqlDump and GZip Compression come together?

In my case, I needed to backup a very large multisite WordPress database.  After some further discover I discovered that it would behoove me to compress the database as well.   Without compression, the backup file was 250 megs, with compression it was 25 megs.

What is the syntax for a Cron Job with MySqlDump and GZip Compression?

Just use this

mysqldump –opt -Q -u[YourUserName] -p[YourPassword] [YourDatabaseName] |  gzip >/path/to/desired/backup/location/`date`.sql.gz

That will create a file named after the current date and time that is a zipped version of your database.  It runs surprisingly quickly.

What is the catch?

The reason this particular little task took me some extra time to do is because I had forgotten that Unix system use the back tick character (`) and not the single quote (‘).  FYI – the back tick character is the one located underneath the escape key.


25
May 12


Written By Steve French

 

How to programatically set the sql server database used by entity framework

The Problem:

'Entity Framework' photo (c) 2009, SondreB - license: http://creativecommons.org/licenses/by/2.0/For one reason or another you need to set the database used by entity framework programatically.  The more common way of doing such a thing is to set the database in your web.config class, but for whatever reason you need to set it in actual C# code.

The Cause:

There is no cause really, it is merely the way that entity framework and sql server work together.

The Solution:

The answer lies in setting the constructor properly.

Example Code Using Entity Framework and Data Context

using System.Data.Entity;

namespace MyDBServerExperiments.Models
{
public class DTFContext : DbContext
{
public DTFContext() : base(“Data Source=MyDBServer.DBServer.com;Initial Catalog=MyEntityFrameworkDB;Persist Security Info=True;user id=MyUsername; Password=MyPassword;”) { }

public DbSet<User> Users { get; set; }
public DbSet<BusinessObjects> BusinessObjects { get; set; }
public DbSet<Property> Properties { get; set; }

}

}

The above would be your data context file that uses the DBContext file  in your models folder, just fyi (that is the common place for Entity Framework models in the standard  Visual Studio 2010 web solution structure).

Note, everything happens in the constructor.  This give you many interesting opportunities to programatically swap out Sql Server database names and users, compared to the web.config option, which tends to be far more static.  It allows far more extensive use of business objects and


24
Apr 12


Written By Steve French

 

How to make a random name generator in C#

I recnetly came up with a simple random name generator to do an initial seed of a database for testing using real names,a nd I thought I would share. Here is my NameGenerator.cs file. It’s fairly simple, it just picks a name at random out of the top 100 first names and the top 100 last names for the year 2011. Enjoy!

The code for the random name generator in C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MyNamespace
{
public class NameGenerator
{
public static Random rnd = new Random();

 

public static string GenRandomLastName()
{
List<string> lst = new List<string>();
string str = string.Empty;
lst.Add(“Smith”);
lst.Add(“Johnson”);
lst.Add(“Williams”);
lst.Add(“Jones”);
lst.Add(“Brown”);
lst.Add(“Davis”);
lst.Add(“Miller”);
lst.Add(“Wilson”);
lst.Add(“Moore”);
lst.Add(“Taylor”);
lst.Add(“Anderson”);
lst.Add(“Thomas”);
lst.Add(“Jackson”);
lst.Add(“White”);
lst.Add(“Harris”);
lst.Add(“Martin”);
lst.Add(“Thompson”);
lst.Add(“Garcia”);
lst.Add(“Martinez”);
lst.Add(“Robinson”);
lst.Add(“Clark”);
lst.Add(“Rodriguez”);
lst.Add(“Lewis”);
lst.Add(“Lee”);
lst.Add(“Walker”);
lst.Add(“Hall”);
lst.Add(“Allen”);
lst.Add(“Young”);
lst.Add(“Hernandez”);
lst.Add(“King”);
lst.Add(“Wright”);
lst.Add(“Lopez”);
lst.Add(“Hill”);
lst.Add(“Scott”);
lst.Add(“Green”);
lst.Add(“Adams”);
lst.Add(“Baker”);
lst.Add(“Gonzalez”);
lst.Add(“Nelson”);
lst.Add(“Carter”);
lst.Add(“Mitchell”);
lst.Add(“Perez”);
lst.Add(“Roberts”);
lst.Add(“Turner”);
lst.Add(“Phillips”);
lst.Add(“Campbell”);
lst.Add(“Parker”);
lst.Add(“Evans”);
lst.Add(“Edwards”);
lst.Add(“Collins”);
lst.Add(“Stewart”);
lst.Add(“Sanchez”);
lst.Add(“Morris”);
lst.Add(“Rogers”);
lst.Add(“Reed”);
lst.Add(“Cook”);
lst.Add(“Morgan”);
lst.Add(“Bell”);
lst.Add(“Murphy”);
lst.Add(“Bailey”);
lst.Add(“Rivera”);
lst.Add(“Cooper”);
lst.Add(“Richardson”);
lst.Add(“Cox”);
lst.Add(“Howard”);
lst.Add(“Ward”);
lst.Add(“Torres”);
lst.Add(“Peterson”);
lst.Add(“Gray”);
lst.Add(“Ramirez”);
lst.Add(“James”);
lst.Add(“Watson”);
lst.Add(“Brooks”);
lst.Add(“Kelly”);
lst.Add(“Sanders”);
lst.Add(“Price”);
lst.Add(“Bennett”);
lst.Add(“Wood”);
lst.Add(“Barnes”);
lst.Add(“Ross”);
lst.Add(“Henderson”);
lst.Add(“Coleman”);
lst.Add(“Jenkins”);
lst.Add(“Perry”);
lst.Add(“Powell”);
lst.Add(“Long”);
lst.Add(“Patterson”);
lst.Add(“Hughes”);
lst.Add(“Flores”);
lst.Add(“Washington”);
lst.Add(“Butler”);
lst.Add(“Simmons”);
lst.Add(“Foster”);
lst.Add(“Gonzales”);
lst.Add(“Bryant”);
lst.Add(“Alexander”);
lst.Add(“Russell”);
lst.Add(“Griffin”);
lst.Add(“Diaz”);
lst.Add(“Hayes”);

str = lst.OrderBy(xx => rnd.Next()).First();
return str;
}
public static string GenRandomFirstName()
{
List<string> lst = new List<string>();
string str = string.Empty;
lst.Add(“Aiden”);
lst.Add(“Jackson”);
lst.Add(“Mason”);
lst.Add(“Liam”);
lst.Add(“Jacob”);
lst.Add(“Jayden”);
lst.Add(“Ethan”);
lst.Add(“Noah”);
lst.Add(“Lucas”);
lst.Add(“Logan”);
lst.Add(“Caleb”);
lst.Add(“Caden”);
lst.Add(“Jack”);
lst.Add(“Ryan”);
lst.Add(“Connor”);
lst.Add(“Michael”);
lst.Add(“Elijah”);
lst.Add(“Brayden”);
lst.Add(“Benjamin”);
lst.Add(“Nicholas”);
lst.Add(“Alexander”);
lst.Add(“William”);
lst.Add(“Matthew”);
lst.Add(“James”);
lst.Add(“Landon”);
lst.Add(“Nathan”);
lst.Add(“Dylan”);
lst.Add(“Evan”);
lst.Add(“Luke”);
lst.Add(“Andrew”);
lst.Add(“Gabriel”);
lst.Add(“Gavin”);
lst.Add(“Joshua”);
lst.Add(“Owen”);
lst.Add(“Daniel”);
lst.Add(“Carter”);
lst.Add(“Tyler”);
lst.Add(“Cameron”);
lst.Add(“Christian”);
lst.Add(“Wyatt”);
lst.Add(“Henry”);
lst.Add(“Eli”);
lst.Add(“Joseph”);
lst.Add(“Max”);
lst.Add(“Isaac”);
lst.Add(“Samuel”);
lst.Add(“Anthony”);
lst.Add(“Grayson”);
lst.Add(“Zachary”);
lst.Add(“David”);
lst.Add(“Christopher”);
lst.Add(“John”);
lst.Add(“Isaiah”);
lst.Add(“Levi”);
lst.Add(“Jonathan”);
lst.Add(“Oliver”);
lst.Add(“Chase”);
lst.Add(“Cooper”);
lst.Add(“Tristan”);
lst.Add(“Colton”);
lst.Add(“Austin”);
lst.Add(“Colin”);
lst.Add(“Charlie”);
lst.Add(“Dominic”);
lst.Add(“Parker”);
lst.Add(“Hunter”);
lst.Add(“Thomas”);
lst.Add(“Alex”);
lst.Add(“Ian”);
lst.Add(“Jordan”);
lst.Add(“Cole”);
lst.Add(“Julian”);
lst.Add(“Aaron”);
lst.Add(“Carson”);
lst.Add(“Miles”);
lst.Add(“Blake”);
lst.Add(“Brody”);
lst.Add(“Adam”);
lst.Add(“Sebastian”);
lst.Add(“Adrian”);
lst.Add(“Nolan”);
lst.Add(“Sean”);
lst.Add(“Riley”);
lst.Add(“Bentley”);
lst.Add(“Xavier”);
lst.Add(“Hayden”);
lst.Add(“Jeremiah”);
lst.Add(“Jason”);
lst.Add(“Jake”);
lst.Add(“Asher”);
lst.Add(“Micah”);
lst.Add(“Jace”);
lst.Add(“Brandon”);
lst.Add(“Josiah”);
lst.Add(“Hudson”);
lst.Add(“Nathaniel”);
lst.Add(“Bryson”);
lst.Add(“Ryder”);
lst.Add(“Justin”);
lst.Add(“Bryce”);

//—————female

lst.Add(“Sophia”);
lst.Add(“Emma”);
lst.Add(“Isabella”);
lst.Add(“Olivia”);
lst.Add(“Ava”);
lst.Add(“Lily”);
lst.Add(“Chloe”);
lst.Add(“Madison”);
lst.Add(“Emily”);
lst.Add(“Abigail”);
lst.Add(“Addison”);
lst.Add(“Mia”);
lst.Add(“Madelyn”);
lst.Add(“Ella”);
lst.Add(“Hailey”);
lst.Add(“Kaylee”);
lst.Add(“Avery”);
lst.Add(“Kaitlyn”);
lst.Add(“Riley”);
lst.Add(“Aubrey”);
lst.Add(“Brooklyn”);
lst.Add(“Peyton”);
lst.Add(“Layla”);
lst.Add(“Hannah”);
lst.Add(“Charlotte”);
lst.Add(“Bella”);
lst.Add(“Natalie”);
lst.Add(“Sarah”);
lst.Add(“Grace”);
lst.Add(“Amelia”);
lst.Add(“Kylie”);
lst.Add(“Arianna”);
lst.Add(“Anna”);
lst.Add(“Elizabeth”);
lst.Add(“Sophie”);
lst.Add(“Claire”);
lst.Add(“Lila”);
lst.Add(“Aaliyah”);
lst.Add(“Gabriella”);
lst.Add(“Elise”);
lst.Add(“Lillian”);
lst.Add(“Samantha”);
lst.Add(“Makayla”);
lst.Add(“Audrey”);
lst.Add(“Alyssa”);
lst.Add(“Ellie”);
lst.Add(“Alexis”);
lst.Add(“Isabelle”);
lst.Add(“Savannah”);
lst.Add(“Evelyn”);
lst.Add(“Leah”);
lst.Add(“Keira”);
lst.Add(“Allison”);
lst.Add(“Maya”);
lst.Add(“Lucy”);
lst.Add(“Sydney”);
lst.Add(“Taylor”);
lst.Add(“Molly”);
lst.Add(“Lauren”);
lst.Add(“Harper”);
lst.Add(“Scarlett”);
lst.Add(“Brianna”);
lst.Add(“Victoria”);
lst.Add(“Liliana”);
lst.Add(“Aria”);
lst.Add(“Kayla”);
lst.Add(“Annabelle”);
lst.Add(“Gianna”);
lst.Add(“Kennedy”);
lst.Add(“Stella”);
lst.Add(“Reagan”);
lst.Add(“Julia”);
lst.Add(“Bailey”);
lst.Add(“Alexandra”);
lst.Add(“Jordyn”);
lst.Add(“Nora”);
lst.Add(“Carolin”);
lst.Add(“Mackenzie”);
lst.Add(“Jasmine”);
lst.Add(“Jocelyn”);
lst.Add(“Kendall”);
lst.Add(“Morgan”);
lst.Add(“Nevaeh”);
lst.Add(“Maria”);
lst.Add(“Eva”);
lst.Add(“Juliana”);
lst.Add(“Abby”);
lst.Add(“Alexa”);
lst.Add(“Summer”);
lst.Add(“Brooke”);
lst.Add(“Penelope”);
lst.Add(“Violet”);
lst.Add(“Kate”);
lst.Add(“Hadley”);
lst.Add(“Ashlyn”);
lst.Add(“Sadie”);
lst.Add(“Paige”);
lst.Add(“Katherine”);
lst.Add(“Sienna”);
lst.Add(“Piper”);

str = lst.OrderBy(xx => rnd.Next()).First();
return str;
}
}
}


23
Apr 12


Written By Steve French

 

How to use UI Hints and Display Templates in ASP.net MVC 3

'wtf - code quality measurement' photo (c) 2008, smitty42 - license: http://creativecommons.org/licenses/by-nd/2.0/Surprisingly there is very little information about UI Hints and Display templates for ASP.net MVC 3, so I thought I would share what I have learned.

What are Display Templates?

Display Templates are lovely features of ASP.net MVC 3 that allow you to have a common formatting for certain properties of your objects.  For example, take the belowp roperty (which should be located in your models folder)

[DataType(DataType.ImageUrl)]
[UIHint(“ImageUrl”)]
[Display(Name = “Photo”)]
public string Photo { get; set; }

Everything looks like a standard property, UIHint property.  It would correspond to the Display Template (which is below, it would be name “ImageUrl.cshtml” and would be located in your Views/Shared/DisplayTemplates folder)

@model string
<img style=”display: block;” src=”@Model” alt=”” align=”right” />

What does the UI Hint do?

The UI Hint tells ASP.net MVC 3 to always display the Photo property using the formatting in the ImageUrl.cshtml file.  That way everything is nice, clean and using much less code.

How do you call UI Hints and Display Templates?

Just use the Html.DisplayFor command, for example the Display template below would look like this in Visual Studio 2010

@Html.DisplayFor(xx => xx.Photo)

and would render as

<img style=”display: block;” src=”/img/Photos/Photo123.png” alt=”” align=”right” />

in the browser, allowing you to keep formatting and style consistent across your entire site with very little effort.

 


10
Apr 12


Written By Steve French

 

How to do a cool flash notification message in asp.net mvc 3 in 6 easy steps

I pieced all of this together from various sources online, so the code is a bit rough, but here it is:

1.  Create a partial razor view, call it _NotifyBar.cshtml, it contains this:

@if (Request.Cookies[“NotifyBar”]!=null)
{

var c = new HttpCookie(“NotifyBar”);
c.Expires = DateTime.Now.AddDays( -1 );
Response.Cookies.Add( c );

}

2.  Put this in the header of your _Layout.cshtml file
//here is the jbar stuff

<script type=”text/javascript”>//
$(document).ready(function () {
$(“#message”).fadeIn(2000);
$(“#message”).delay(5000).fadeOut(1000);
$(“#message a.close-notify”).click(function () {
$(“#message”).fadeOut(“slow”);
return false;
});
});
</script>

3.  Right after the body of your _Layout.cshtml page there is this code

@Html.Partial(“_NotifyBar”)

4. Create a file called ExtensionMethods.cs, add in this code

public static ActionResult SetStatusMessage(this ActionResult ar, string str)
{
var c = new HttpCookie(“NotifyBar”);
//c.Expires = DateTime.Now.AddDays(-1);
c.Value = str;
HttpContext.Current.Response.Cookies.Add(c);
return ar;
}

5. Put this in your stylesheet

#message {
font-family:Arial,Helvetica,sans-serif;
position:fixed;
top:0px;
left:0px;
width:100%;
z-index:105;
text-align:center;
font-weight:bold;
font-size:100%;
color:white;
padding:10px 0px 10px 0px;
background-color:#8E1609;
}

#message span {
text-align: center;
width: 95%;
float:left;
}

.close-notify {
white-space: nowrap;
float:right;
margin-right:10px;
color:#fff;
text-decoration:none;
border:2px #fff solid;
padding-left:3px;
padding-right:3px
}

.close-notify a {
color: #fff;
}

6. Then in your controller, just return add “SetStatusMessage” on your RedirectToAction, for example

return RedirectToAction(“Index”).SetStatusMessage(“You have successfully edited the ” + project.ProjectName + ” project.”);

That’s it!  You can now have a fade-out notification message on any page you like.  The use of the cookies is a bit cumbersome, but I could implemnt it quickly.

 

This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog


24
May 11


Written By Steve French

 

The most time-saving sql code I have ever written

database schemaphoto © 2007 gnizr | more info (via: Wylio) I decided to update my JargonDatabase.com web property last month started to update define the user-submitted jargon terms.  Much to my surprise users had submitted over 15,000 unique undefined jargon terms.  Some of them were conceptual duplicates, like “whites of their eyes” and “the whites of their eyes”, but how to filter the terms to see if they were duplicates or not?

After much pondering I decided to try to match words in the term with words already in the database – there would be many false positives, but was that method was the best way of ensuring I did not delete anything by accident.

To do that I created a function and a stored procedure.  The function:

CREATE FUNCTION Split(@String varchar(8000), @Delimiter char(1))
returns @temptable TABLE (items varchar(8000))
as
begin
declare @idx int
declare @slice varchar(8000)
select @idx = 1
if len(@String)<1 or @String is null  return
while @idx!= 0
begin
set @idx = charindex(@Delimiter,@String)
if @idx!=0
set @slice = left(@String,@idx – 1)
else
set @slice = @String

if(len(@slice)>0)
insert into @temptable(Items) values(@slice)
set @String = right(@String,len(@String) – @idx)
if len(@String) = 0 break
end
return
end

The function takes a string, splits it at every occurrence of a space (” “), inserts those new records into a table, and then returns that table.  From there I created the following procedure.

CREATE PROCEDURE FindSimilarSearchTerms
@SearchTermID int
AS
BEGIN
declare @SearchTerm nvarchar(450)
SET @SearchTerm=(SELECT top 1 SearchTermTerm  FROM UserDefinedTerms WHERE SearchTermID=@SearchTermID)
CREATE TABLE #tmp (TermID int IDENTITY, TermWord nvarchar(450))
INSERT INTO #tmp(TermWord) select items from  dbo.split(@SearchTerm, ‘ ‘)
SELECT JargonID, JargonTerm FROM JargonApprovedTerm, #tmp WHERE JargonTerm LIKE ‘%’+TermWord+’%’
DELETE FROM #tmp
DROP TABLE #tmp
END
GO

The procedure takes the ID of a search term, grabs the text of the user-submitted name (the “SearchTermTerm” field) and from there creates a temporary table, and then matches any word in the user-submitted name to any word in the approved jargon table in the database, that provides a quick way of knowing whether or not I can safely delete a term. Definitely a time consuming task, but a lot better than it could be.

 

This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog


04
Jan 11


Written By Steve French

 

How to prevent images and photos from being stolen your site

they're welcome 2itThe Problem: You need to prevent people from saving images and photos that are featured on your website

The Cause: There is no real solution to this – if you can see it online, you can copy it, but you can make it more difficult.

The Solution: Insert this bit of code in your BODY

tag ondragstart=”return false” onselectstart=”return false” oncontextmenu=”return false”

that’s it!

Thanks to HyperGurl for the initial start on this problem.

Creative Commons License photo credit: weegeebored

 

This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog


27
Dec 10


Written By Steve French

 

How to fix the copy file problem in C#

Cavalry moving forwardphoto © 1918 National Library of Scotland | more info (via: Wylio)The Problem: You need to copy a file from one location on the server to another and cannot remember how.

The Cause: It is too short and simple, and easily forgotten

The Solution: Just use the following code:

public static void CopyAndRenameFile(string OldPath, string OldFileName, string NewPath, string NewFileName)
    {
        if (File.Exists(OldPath + OldFileName))
        {
            File.Copy(OldPath + OldFileName, NewPath + NewFileName, true);
        }
    }

That’s it!

 

This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog


06
Dec 10


Written By Steve French

 




Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.