Sunday, 12 May 2013

Make DOS Print List of Files In a Folder, Get Filenames in .TXT File

If you are a programmer or developer sometimes you might want to list all file names in an excel sheet from particular directory, folder in your computer. Copying each and every filename separately is big hassle and the process becomes more tedious as the number of files in that directory increases which makes it almost impossible to manually get filenames of files in a folder.

If you are a windows user then its possible to list all the filenames of a folder into a text file. And for that purpose, you won’t have to install any extra application, you can do it directly with Windows Command Prompt (DOS).



Print List of Files In a Folder into a .TXT File Using CMD-DOS


Step 1: Open Command DOS Prompt in administrator mode. Click on Start button/orb in Windows 7, Vista and type "cmd" in the search box. The command prompt appears in the list as cmd.exe. Now, right-click on it and select "Run as administrator".




Windows XP users can open command prompt by simply typing cmd in the Run window (Win + R).

Step 2: In the command prompt, type cd\ and hit Enter to go to root. Then the command you must execute to print the list of file names is:

dir [folder_location] /b >[output_file_name.txt]

Let us describe the command by an example. If you want to print the file name of the folder Assignment and if the full path location of that folder let be D:\important\documents\Assignment, then the command to print the file names should be as below:



dir D:\important\documents\Assignment /b >chart.txt

Make sure that you have given the full path of the source. The output file will be created in the root drive where the command prompt is running. In this case, my Windows drive is assigned as C:, so the files is created as C:\chart.txt.
The output file, here it is chart.txt is a text file which opens with Notepad in Windows system by default. So whenever you need to use the name of the content of a folder in any application or want to print them, you can easily do that by the above procedure.
Suppose you want to place all the file name from a specific folder into a Microsoft Excel file. Just create the list of file name and open it. Press Ctrl+A to select them all and copy (Ctrl+c) then go to excel and paste (Ctrl+v). The files name will be automatically added one-by-one in separate cells. 


Software, Tools to Get List of Files in a Folder in Windows




Increase Windows 7 Experience Index to Get Highest Score 7.9 Rating

Did you know, Vista and Windows 7 has this useful tool for advanced users called Windows Experience Index to test, benchmark their system and measure the efficiency of your computer’s hardware and software performance based on their configuration and how they work together with each other. 


You can access the "Windows Experience Index" tool by clicking the Start orb/button and searching for "windows experience index" and then clicking on Check the Windows Experience Index. or by Pressing Widows Key + Pause or going to System Properties by right clicking My Computer.
Here is an example of my PC’s score… (original)





How to Fake Your Windows Experience Index Score to Get Highest Rating

Now, lets see how to change it manually and get the highest windows experience index score by doing a simple edit in a system file containing your PC’s rating.
Go to C:\Windows\Performance\WinSAT\DataStore and look for a file named (date) Formal.Assessment (Initial).WinSAT.xml






Open this file with WordPad and edit your score manually to 7.9 (that’s the max. value). Look for a code like <SystemScore>4.9</SystemScore> and change the current rating to 7.9 and save the file.
Now go to your Windows Experience Index screen again and you will see that your score is now the highest rating ie. 7.9 . You can set it at a lower rate to make it look natural while fooling your friends. See my result after the edit.



You can click Re-run the assessment to re-analyze your system performance and give you the actual score on that page.

Generally, a higher score/rating means that your computer will perform faster, better than a computer with less base score while performing advanced resource-intensive tasks and running heavy software which require more processing power and system memory.

Saturday, 11 May 2013

Hack to Change Windows Media Player 12 (WMP12) Library View Background Image


Windows Media Player 12 (WMP12) is going to be released as part Windows 7. The main feature of Windows Media Player 12 or WMP 12 is the significantly enhanced and beautified graphical user interface (GUI). Gone and removed is the “Now Playing” button. Instead, “Now Playing” is now a full screen (video size adjustable) playback view with just playback controls.

Other feature of WMP 12 is inclusion of native support for H.264, Xvid and DivX video as well as AAC audio. WMP12 also adds Library View to separates library management from the “Now Playing” window. Library in WMP12 allows user to manage media files such as Playlists, Music, Video, Pictures, Recorded TV, Radio Stations and other media.

The Library View of WMP 12 allows user to use and apply a background image. In fact, WMP12 includes several background image by default. If you don’t like the current background of Windows Media Player 12 Library View, use the following registry hack to modify and change the background image to other included image.

How to Change Background Image of Library View in WMP12

1. Run Registry Editor (RegEdit).

2. Navigate to the following registry key: 


HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences

3. In the right registry value pane, locate the REG_DWORD (DWORD 32-bit) registry entry named LibraryBackgroundImage




4. The default value data for LibraryBackgroundImage is 6. Modify the value data to other number to change the WMP12 Library background image.
The valid value is 0 to 6 for 6 different background images, with 0 as no background image. As a convenient, the screenshots of all background images are listed below, from 0 to 6:





5. Exit from Registry Editor and restart Windows Media Player for new background image to take effect.
The new background images are apparently stored in wmploc.dll. With the above trick, there is no need to manually hack the wmploc.dll to get the new background image on WMP12.

Enabling Windows Media Player bar in Windows 7 taskbar

Unfortunately Windows Media Player 12,  already installed with Windows 7, has no support to minimize as toolbar in the taskbar. To enable this bar, just need copy a file from Windows Media Player for Windows Vista. Now I will show how do this:

1. You will need of a dll called wmpband.dll, that come with Windows Vista.

file location:
%ProgramFiles%\Windows Media Player\wmpband.dll

If you not own it Download here


2. Copy the wmpband.dll into %Program Files%\Windows Media Player\ folder of Windows 7 (with WMP12).

3. Go to Control Panel -> System and Security -> Administrative Tools, and open Services panel.

4. Stop the Windows Media Player Network Sharing Service.



5. Open the Command Prompt with administrator privileges. Star > All Programs > Accessories > right click in “Command Prompt” and click “Run as Administrator”.

6. Run and execute the following command:

regsvr32 “%ProgramFiles%\Windows Media Player\wmpband.dll”

7. Restart the Windows Media Player Network Sharing Service.

8.Start Windows Media Player 12.

9.Minimize the window of Windows Media Player.

10. Right click on Windows Taskbar, and select Toolbars, and choose Windows Media Player from the list (a tick will appear beside it on subsequent view). 


11. The Windows Media Player toolbar will appear close to notification area (system tray). 




For user facing the following error message, just click on “Yes” to continue:
The Windows Media Player toolbar isn’t compatible with this version of Windows
If you continue, the toolbar might appear incorrectly. To check for an updated version, go to the software publisher’s website.
Do you want this toolbar on your taskbar?
Tip: If there is problem enabling the Windows Media Player 12 toolbar in Windows 7, try to perform the steps above again after a clean reboot and before running Windows Media Player.

Thursday, 9 May 2013

What is C Programming


Batch File Programming




Introduction
Batch file programming is the native programming offered by the Microsoft Windows Operating System. Batch file is created using any text editors like notepad, WordPad, WinWord or so on, which comprises of a sequence of built-in commands used to perform some often done tasks like deleting a series of files of same type or of different type, creating logs, clearing unwanted craps from your computer and even for creating a batch VIRUS.

Whenever a Batch program is executed, it was interpreted line-by-line by the CLI (Command Line Interpreter) command.com or the cmd.exe. Batch file is really helpful in automating tedious tasks and for maintaining system logs. The commands used while creating a batch file are case insensitive, in the sense that it may accept both small and upper case letters.


Modes:
There are two different modes that are supported by DOS (Disk Operating System), they were,
1. Interactive Mode.
2. Batch Mode (Silent Mode).


Interactive mode:
In interactive mode, when a command is executed, it interacts with the user for input and depending upon the input supplied by the user, the further processes are carried out. For example, let’s take the ‘del’ command.

The ‘del’ command is used for deleting files that reside inside a directory. Now I am going to delete all the files inside a folder named ‘a’, and when I executed the following command, it is interacting with me prompting “Are you sure (Y/N)?”, confirming the deletion operation, and depending upon my input, it decides what to do. If I hit ‘Y’ then it will delete the files specified, else if I hit ‘N’ then it won’t delete.

C:\>del a
C:\a\*, Are you sure (Y/N)? y


Batch Mode:
Batch mode can also be referred as ‘Silent mode’ or ‘Quiet Mode’, and this is mere opposite to the interactive mode. The command that operates at batch mode will never interact with the user at any instance, instead it will take care of every operation by itself.

For example, I am going to explain this by using the same ‘del’ command. There is a switch available for the ‘del’ command, which makes the command to operate at silent mode, and that switch is ‘/Q’

C:\>del /Q a
C:\>

In this case, the command is not at all interacting with me, whether to delete those file or not. In the above example, I have tried to delete the same files in the same folder by using the same command but with a different switch. Anyhow both the commands will perform the same operation but the mode it
operates differs.



Wednesday, 8 May 2013

Make over 1,000 folders in few seconds

Make an unlimited amount of folders in any place you want.

1. Open notepad and type :

@echo off
:top
md %random%
goto top 







@echo off makes it so that it appears to be a blank screen but actually its making hundreds of folder.
md %random% is command that creating folders with random names.
goto top – return to label 
:top, infinite loop


2. Save it as 1000folders.bat

3. After that you will get icon that looks as show below.