The techie in me RSS 2.0
 Friday, November 26, 2010

 

I don't think we can ever say good by to our good old MS-DOS. My first intimate interaction with Micro Computer(the original name of PC ) was through MS-DOS. Now in the advanced age of computer still I am using DOS, this time as part of one the build scripts. Our continuous integration creates an installer every night(early morning to be exact – this is a cheat, I'll describe it later). We want to keep them for 2 weeks and delete afterwards. Now to do this I can create a simple .net console app, which will be more efficient in error handling etc. But I like to do it in the good old way :).

Found a command line utility –ForFiles- comes with WinXP command line.

(If you don't have installed by default – in most of the case no- you can download it from the MS FTP server. You may want to place it to C:\WINDOWS\system32 or update the PATH variable accordingly)

forfiles -p "C:\SearchFolder" -s -m*.msi -d-14 -c "cmd /c del @path"

-p : path to search for
-s : include subdirectories
-m : search mask (*.msi files here)
-d : files older than days (14 in my case), you can use dates instead
-c : the command to execute on the files

also checkout the help for 'forfiles'. If you have forgotten how to do it, its forfiles/?... uh it doesn't work ? simply type forfiles :)

 

The following variables can be used in Command : (@path is already used in the above example)
@FILE, @FNAME_WITHOUT_EXT, @EXT, @PATH, @RELPATH, @ISDIR, @FSIZE, @FDATE, @FTIME

 

hope this helps...

 

edit

 

found a nice website with WinXP command lines

Friday, November 26, 2010 6:58:00 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding | Everything | Legacy
 Sunday, November 21, 2010

How to hard reset HTC Desire to factory setting, some call it factory reset.

I have an HTC Desire Z, I had to hard reset the phone couple of times because of all junk apps I install.

Steps to hard reset, may be helpful for you…

HARD RESET WILL WIPE ALL YOUR PERSONAL DATA, so please do a backup before you start

Turn off your phone,
1. With the phone turned off, press and hold the VOLUME DOWN button, and then briefly press the POWER button.
2. Wait for the screen with the three Android images to appear, and then release the VOLUME DOWN button..
3. Press VOLUME DOWN to select CLEAR STORAGE, and then press POWER.
4. Press VOLUME UP to start the factory reset.

 

I think this is different from what you do thorugh the ‘factory reset’ menu option in setting. ( I am not sure though)

Sunday, November 21, 2010 9:44:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Everything | Non MS | Windows Mobile
 Saturday, October 16, 2010

My colleague suggested me a nice UI mock-up tool recently. Balsamiq has a free web version with some limitation, its not very expensive if you want to buy. I like the product though, we can say bye bye to MS paint for UI mock-up also its a nice idea they have built in controls for common windows controls.

-Rujith

Saturday, October 16, 2010 8:15:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Everything
 Saturday, October 02, 2010

I am sure that most you have read this in the MSDN documentation, it appears almost everywhere. Recently while brainstorming about a deadlock issue in our project someone raised this topic. ‘Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe’, and claimed that all Framework type static instances are thread safe.

My opinion is this is bit misleading. This doesn't mean that all type in .NET framework are thread safe in static instance, nor that all static instance of any type is thread safe. If you think for a sec, nothing is thread safe by default, the author has to make a type thread safe, in this case MS has taken the time to verify that they are thread safe (which is very easy if they don't touch shared data). So it is your responsibility to make your class/type is thread safe.

I am sure MS is aware of this confusing statement. In old days it used to be only the two sentences in documentation (as above), but now you can see they are elaborating it bit more. Check here documentation for Array

And check this out, Thread Safety for TaskFactory says,

All public and protected members of TaskFactory are thread-safe and may be used concurrently from multiple threads

Hope that helps.

 

Rujith

Saturday, October 02, 2010 10:23:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding | Everything
 Monday, August 30, 2010

Recently I was trying to find duplicate records in a table. The records are considered duplicate if two columns in different records has the same value. For example if first name and last name is same in record1 and record2, they considered as duplicate.

The below query will help to find the duplicate records.

SELECT fname, lname, COUNT(*) AS DuplicateCount FROM [Users]
GROUP BY fname, lname HAVING COUNT(*) > 1
ORDER BY COUNT(*), fname.

 

(I know this is pretty simple one, but most of the time you struggle for the simplest query :) so thought of sharing it)

Monday, August 30, 2010 10:13:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Database
 Friday, July 23, 2010

I recently found a nice free icon editor called IconFX.  Its really cool and very lightweight, you can simply use the exe no need to install. That’s surprise in this world when you have install (and sometimes reboot ) every single piece of software isn't it ?

Try it out… http://icofx.ro/

Thursday, July 22, 2010 11:17:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Everything
About me
Name : Rujith Anand Send mail to the author(s)
Archive
<April 2014>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Blogs I read
Disclaimer

Disclaimer
Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.

© Copyright 2014
Rujith Anand

Statistics
Advertisement
All Content © 2014, Rujith Anand