For editing regular text I do like Notepad++, a text editor with colour syntax highlighting for many different programming languages built in – and a lot of other languages for which people have written User Defined Language (UDL) plugins. Neat … only … when I came to try to make one I found little documentation and what there was was fractured, distributed and dammit just incomplete (incomplete = Can’t find even a snifter via Google in an hour). Indeed, in the UDL dialog of the latest notepad++ (Aug 2015) is a link to a temporary documentation site – which ceased in 2012 with a message “New, improved documentation site will replace this one in near future.”
So [cracks knuckles] lets try and work it out.
This is primarily a programming blog so I’m going to be posting code snippets. Of course I want those snippets to be presented nice and pretty like. After the on-line site I used for doing this formatting seemed to disappear I thought I’d better have a scoot-around for a replacement.
… Or How To Save A Fortune On Website Development.
There seems to be a new craze among website designs that really seems to have kicked in over the last 12 months. If you too choose to do this on your website then here is a tip that will save you a lot of time and money.
So, you use Xcopy to backup the contents of one hard drive onto another, new, hard drive. It’s gonna take a while and you leave it running.
Xcopy /s /c <source>\*.*
When you return you find there was a power outage (or, in my case, I missed one of the power management settings that the stupid computer decided to invoke).
How do you restart copying ? You could run the same command again but now you will be prompted on every file that had already and simply saying yes-to-all means re-copying the same files again – in my case that’d waste at least 6 hours.
What you want is to be able to say “no to all” when asked if you wan’t to over-write but alas like so many programs no-one seems to ever supply this as an option.
Fortunately there is non-obvious solution for XCopy – add the /D option which
Copies files changed on or after the specified date.If no date is given, copies only those files whose source time is newer than the destination time.
Since any previously copied file will have a matching date time the file will not be over-written.
That was lucky, but I’ve used other command line utilities in the past where I’ve wanted a “no-to-all” and couldn’t find an obvious workaround. Until I tripped over this link which had one solution that made be laugh. Simply create a text file full of “n” characters, each followed carriage return (you could knock up a quickie app to do this in 5 mins – 4 mins for Visual Studio to start up (why is it so slow these days) and 1 minute to write/compile/run). Then simply pipe that text file into the offending command line app, for example if there hadn’t been another option for XCopy then:
Xcopy /s /c <source>\*.* <MyTextFileFullOfNs.Txt
Funny ? Well, yes ! But it’d get the job done when no other solutions were forthcoming.