Posts Tagged ‘folder’

File/Folder named CON or LPT1 on WINDOWS

December 26th, 2012, posted in Windows
Share

File/Folder named CON or LPT1 on WINDOWS

G:>mkdir CON
The directory name is invalid.

G:>mkdir LPT1
The directory name is invalid.

G:>mkdir LPT2
The directory name is invalid.

G:>mkdir LPT9
The directory name is invalid.

Have you ever tried to make a folder or file named CON or LPT1 (in general LPTX X takes 1,2,3,…9)? If not try now and see that you cannot make a folder or file with those names. Have u already done? Read on …

Why is this so?

Inorder to find out why this doesn’t work we have to go back to the age of MS-DOS. Microsoft Disk Operating System (MS-DOS) is a command-line operating system that existed before the advent of GUI OS (Graphical User Interface). Everything from making ,renaming, deleting etc was done using commands. Some of the commands are

COPY     Copies one or more files to another location.
DEL      Deletes one or more files.
DIR      Displays a list of files and subdirectories in a directory.
FIND     Searches for a text string in a file or files.
.
.

Let us look more closely to the COPY command. The COPY command usage is as follows:

COPY [options] <source> [options] <destination>

In DOS everything is considered as files, even keyboard and printers. The filename for keyboard is given as “CON” and the printer names are given as “LPT1”, “LPT2” etc.. So inorder to copy something from keyboard (our input) the following command is used.

G:>COPY CON mydata.txt
These lines come in mydata.txt and inorder to stop input press Ctrl+Z
^Z

G:>COPY mydata.txt LPT1

So now you suppose that a folder or file named “con” could be created and you give a COPY CON command. What is DOS supposed to do? copy the CON file or use the keyboard console as input? Thus an ambiguity arises. So Microsoft has purposely disabled making of files or folders named CON / LPT1 / LPT2 etc. in order to remove this ambiguity.

Could you make a CON or LPT1 .. file on WINDOWS?

Found more invalid names? Let me know …..
Invalid Name List

+ CON
+ LPT1, LPT2, LPT3, LPT4 ... LPT9
+ PRN
+ NUL
+ COM1, COM2, COM3 .... COM9
Share

Make an Undeletable Folder

December 23rd, 2012, posted in Windows
Share

undelateable folder
1. Open cmd ( Type in Run option, the command ‘cmd’ or navigate to All Programs->Accessories-> Command Prompt)


2. In cmd change to the directory that you want ( you can use the commands ” cd…” to exit the curent folder and “E:” for example to change from your current drive to E drive.

3. Type md lpt1\ and press enter, the folder now will be in your E:

4. If you try to delete or rename it, it will appear error message

5. If you want to delete it just go to ‘cmd’, navigate to the directory and type rd lpt1\ and press Enter.

Share

How to Make a Portable Hard Drive Bootable

June 3rd, 2011, posted in TEChNoLoGY
Share

The operating system on some computers can crash, requiring an external source for the operating system to be used to recover data and repair the internal hard drive. Creating a bootable portable drive using an external hard drive or USB thumb drive is a solution to maintain a convenient recovery system. A bootable portable drive can also be used to run a different operating system on a computer.

Instructions :

STEP #1 :
Plug the USB drive into your computer’s USB port.
Download and install the HP USB Disk Storage Format Tool program (see Resources section below for link). Then launch the program, select your USB drive and format the USB drive in NTFS format.
If desired, type the name of your USB device in the “Name” field.
Exit the utility program when formatting is complete.

STEP #2:
Download and install the HP USB Key Utility program (see Resources section below for link).
Open a window for your USB drive by selecting the drive under “My Computer” located in your Start menu.

STEP #3:
Insert the Windows installation disk into your CD/DVD drive.
Launch the HP USB Key Utility program and click the “Next” button to begin the wizard.
Select the drive letter from the drop-down menu for your CD/DVD drive.
Click the “Next” button.

STEP #4:
Select the radio button next to the option “Create New or Replace Existing Configuration” and click the “Next” button.
Select the option “Create New Filesystem” and click the “Next” button.
Select the option “With Partition” and click the “Next” button.
Select the option “HP Firmware Flash Package” and click the “Next” button.
Click the “Finish” button when the Completion screen is displayed to exit the utility.

STEP #5:
Launch your Internet Explorer application and type “c:” in the address bar.
Select “Folder Options” under “Tools” in the top menu bar. Select the “View” tab and click the option for “Show Hidden Files and Folders” in the left frame.
Deselect (i.e., uncheck) the boxes next to “Hide Extensions for Known File Types” and “Hide Protected Operating System Files.”
Click the “OK” button.

STEP #6:
Select the following files in the window by holding down the “Control” (CTRL) key while clicking:
boot.ini
ntldr
ntdetect
Drag these files to the open window for your USB drive (they will copy to the drive).

STEP #7:
Safely eject your USB drive and remove your Windows installation disk from your CD/DVD drive.

Tips & Warnings:
Make sure that the computers can recognize a USB drive as a start-up device (i.e., older computers reset device recognition as part of their BIOS during start-up).

Share