Main Help Page | Home Page (Internet) | Menus and Windows | Release Notes

cp

cp copies files. It is a subset of its Unix counterpart, as is mv , which moves files.

cp readme.txt c:\mydocs\readme.txt (copy from file to file)

cp readme.txt c:\mydocs (if "mydocs" is a directory, then create "readme.txt" in "c:\mydocs", otherwise, create a file called "mydocs")

cp readme.* \mydocs (a directory is assumed and created if there is more than one source file)

cp -r *.txt \backup (recursive through subdirectories)

cp -i *.txt \backup (interactive -- prompt for overwrite)

cp -! *.txt \backup (non-interactive -- overrides the -i switch)

cp -d *.txt \backup (descend through subdirectories which match the filespec -- see find for an explanation of the difference between -r and -d.)

cp -t *.doc m:\shared (compare time and only copy if newer)

cp -7 *.doc m:\shared (copy files modified seven days ago and sooner)

cp -+7 *.doc m:\shared (copy files modified more than seven days ago)

cp is different from the DOS copy because it can operate on directories and subdirectories. Its primary purpose is to allow Zoom Shell to copy directories as Explorer does, preserving file attributes. cp cannot concatenate files. It also does not match a wildcard on the destination: cp *.txt *.bak does not work.

md

Zoom Shell implements its own md (or mkdir) command. The differences between it and the DOS version is that Zoom Shell creates all intermediate directories, and it accepts forward slashes.

mv

mv moves files. It is a subset of its Unix counterpart, as is cp , which copies files.

mv readme.txt c:\mydocs\readme.txt (move from file to file)

mv d:\mydocs c:\mydocs (move directory and its subdirectories)

mv d:\mydocs\*.txt c:\mydocs (move text files in directory to other directory)

mv -i *.txt \backup (interactive -- prompt for overwrite)

mv -! *.txt \backup (non-interactive -- overrides the -i switch)

mv -7 d:\mydocs\*.txt c:\mydocs (move files modified seven days ago or sooner)

mv -+7 d:\mydocs\*.txt c:\mydocs (move files modified more than seven days ago)

mv -r d:\mydocs\*.txt c:\mydocs (move text files in directory and itssubdirectories)

mv -d d:\mydocs\*.txt c:\mydocs (descend through subdirectories which match the filespec -- see find for an explanation of the difference between -r and -d.)

mv -t d:\mydocs c:\mydocs (merge d:\mydocs into c:\mydocs, comparing file times and only moving the newer ones, where the file already exists in c:\mydocs. Older files in the source directory are simply deleted.)

mv is different from the DOS move because it operates on directories and subdirectories. Its primary purpose is to allow Zoom Shell to move files and/ordirectories as Explorer does, preserving file attributes. It does not match a wildcard on the destination: mv *.txt *.bak does not work.

rm

rm is a subset of the Unix "rm". It deletes files. The supported options are

rm -r (deletes files in the current directory and all subdirectories, getting rid of directories once it is done)

rm -e (leave behind empty subdirectories)

rm -b (use the recycle bin)

rm -! (overrides the recycle bin switch)

rm -i (interactive mode)

rm -f (overrides the interactive mode)

Usage:

rm -re *.tmp (Clean out all .tmp files)

Please note that the default behavior of rm is to bypass the Recycle Bin, so deleted files are gone permanently, as they are when deleted from the DOS prompt.

Notes:

  1. Due to a limitation in PowerBuilder, the filenames of files sent to the recycle bin are padded with extra spaces, so the icons do not appear when they are viewed in Windows Explorer. However, files restored from the Recycle Bin are restored properly, so the icons appear again.

Table of Contents