Showing posts with label File-Management-in-NetWare. Show all posts
Showing posts with label File-Management-in-NetWare. Show all posts

File Management in NetWare

Working on a node in Novell NetWare is as good as working on DOS, coupled with the advantage of having access to files on the server. NetWare allows you to use DOS commands to access files from the server. You are familiar with the tree-like directory structure of DOS and the fact that the NetWare structure is strikingly similar. Hence file management under NetWare will not pose much of a problem to you.

| Follow Up Next |

NetWare Commands

Any of the commonly used DOS commands, like DIR, DEL, REN, CD or MD give the same result in NetWare as they do in DOS. However, these commands may not work the way they are supposed to because of trustee rights and file attributes. For instance, you cannot see the contents of a file for which you do not have the Read right. A DIR command may tell you that a directory is empty, but the fact may be that you do not have the File Scan right in that directory.

Rights and attributes are not the only reasons for the failure of DOS commands to perform their desired tasks. For instance, if you specify the server and the volume name with the COPY command of DOS, it will not work.

Consider the directory structure given in Figure.

Directory Structure

Directory Structure

If you want to copy a file SALEPKGE.BAT from the directory PROG of the volume VOL1 to the directory LIB of VOL2, then the command

C0PYV0Ll:PR0G\SALEPKGE.BATV0L2:LIB

will result in an error message being displayed.

You will encounter the same problem with all the other DOS commands because DOS does not support the concept of volumes. In such situations, where the use of the volume name is imperative, you have to use the equivalent commands provided by NetWare. These commands not only replace their DOS counterparts, but are more powerful and versatile. In case you do not know how to use a particular command, NetWare provides help for all commands through the HELP utility, which can be invoked by typing HELP at the NetWare prompt. Note that the NetWare commands possess a lot of options. Therefore, the slash (/) before an option and back slash (\) in path names can be used to avoid confusion although using the slash in path names is permitted.

| Follow Up Next |

Listing Directories

Assume you are working in the directory USER and want to see the contents of the directory LIB under the volume VOL2. You can use the NetWare command NDIR to list its contents, the syntax is:

NDIR [path] [/option..]

The output is very much the same as that of the DOS DIR command: the names of the files/directories contained therein, their size in bytes and the date and time they were last modified. In addition, NDIR displays the date and time the files/directories were last accessed, their owner's name and the attributes assigned to them

Just like the DIR command of DOS, the NDIR command can also be used with wildcards. The command given below restricts the display of information to that pertaining to files that have the extension TXT.

NDIR V0L2:LIB\*.TXT

Very often you find yourself wanting to display details of files whose names cannot be matched by a common wildcard pattern. For instance, if you want to get information on the files SALES.DBF and TWO. DAT, you are not able to do so with a wildcard match. NetWare allows you to specify more than one filename with the NDIR command as shown below.

NDIR ONE.DBF, TWO.DBF

To view subdirectory information only in the directory BIN, for example, you can use the /DO option along with the command as given below.

NDIR V0L2:BIN/D0

Similarly, to view file information only in the same directory, the command

NDIR V0L2:BIN/F0

can be issued.

You can get information on files created by a particular user through the /OWNER option with the command

NDIR /OWNER = USER2

In the above example, NDIR will give you information about all the files owned by USER2 in the current directory. You can also find out details of files that are not owned by a specific user. The command

NDIR V0L2:LIB /OWNER NOT = USER2

will give you information about files not owned by USER2.

The date of creation of files/directories can sometimes be of great help. For example, if you forget the name of a file in which you had stored an important letter, but remember the date, the twenty-third of November 1994, on which you had created the file, the command

NDIR/CREATE EQ 11-23-94

will list the files that were created on that day, from which you can find the name of your file. The command

NDIR/CREATE BEF 11-23-94

will give you the details of files/directories created before the twenty-third of November 1994, while

NDIR/CREATE NOT BEF 11-23-94

will give you the details of files/directories created on the twenty-third of November 1994 and after.

The command

NDIR /CREATE AFT 11-23-94

will give you the details of files/directories created after the twenty-third of November 1994.

| Follow Up Next |

Renaming Subdirectories

Just as you can rename files, NetWare allows you to rename directories as well. The command to do so is RENDIR. The syntax is:

RENDIR old-path-name new-name

When you rename a directory, you do not affect the attributes or drive mapping associated with that directory. You only change its name.

To change the name of the directory BIN in VOL2 to REPORT, you can give the command

RENDIR V0L2:\BIN REPORT

However, if you have mapped the directory to the G drive before giving the RENDIR command, you can use the drive name instead of the directory name as given below:

RENDIR G: REPORT

| Follow Up Next |

Copying Files

The command to copy files in NetWare is NCOPY. The usage of this command is similar to the COPY command of DOS. The advantage of using NCOPYis that you can copy files across volumes, which cannot be done through the COPVcommand as we have seen earlier. The syntax is:

NCOPY source-path destination-path

To copy all files from directory LIB to current directory, you can use the command

NCOPY V0L2:LIB\*.*

NCOPY can also be used to copy files from one directory in a particular volume to another directory in a different volume.

NCOPY VOL1:PROJ\*.* V0L2:LIB

will copy all the files from the directory PROJ in the volume VOL1 to the directory LIB in the volume VOL2.