TBX Overwrites Current Working Directory

  • 7002865
  • 30-Mar-2009
  • 27-Apr-2012

Environment

Novell NetWare 6.5 Support Pack 7
Novell NetWare 6.5 Support Pack 8

Situation

When performing "copy"  or "cp" commands, after loading TBX.NLM, if the target directory does not exist, the files will be copied from the source directory to the current working directory.  If using the "copy" command, there will be a prompt to overwrite files if they already exist in the current working directory but the overwrite prompt does not include the path so it is not intuitive.  If using the "cp" command, there is no warning displayed, and all files with matching filenames will be overwritten.

Note:  To display current working directory once TBX.NLM is loaded use the "pwd" or "cd" command.

eg.  Assume SYS:\BACKUP\DIB directory does not exist.  Performing "copy sys:\_netware\* sys:\backup\dib" will copy the files from SYS:_NETWARE directory to current working directory.  If current working directory happens to be SYS:\_NETWARE it will overwrite the files and cause them all to be zero byte.  eDirectory has now accidentally been removed.  If the current working directory is anything else, all the files from SYS:\_NETWARE will be harmlessly copied there.

Resolution

Option 1:  If the target directory does not exist, then use the /s switch and it will create the appropriate directory structure.
"copy /s sys:\_netware\* sys:\backup\dib" will create the the directory structure and copy all files to the target.  The /s switch does not work with the "cp" command, and there is no equivalent switch available.

Option 2:  Manually create the directory structure ahead of time.

Status

Reported to Engineering