20.7 Moving files

Function: mbfl_file_enable_move

Declare the commands required to move files and directories. Declaring the intention to use a program

The programs are: mv.

Function: mbfl_file_move SOURCE TARGET ?…?

Move the SOURCE, a file or directory, to TARGET, a pathname. Additional arguments are handed to the command unchanged.

If SOURCE does not exist, or if it is not readable, an error is generated and the return value is 1. If TARGET exists an error is generated and the return value is 1.

Function: mbfl_file_move_to_directory SOURCE TARGET ?…?

Move the SOURCE, a file or directory, into the directory TARGET. Additional arguments are handed to the command unchanged.

If SOURCE does not exist, or if it is not readable, an error message is generated and the return value is 1. If TARGET does not exist or it is not a directory: an error is generated and the return value is 1.

Function: mbfl_exec_mv ARG

Execute the program mv using the given optional command line arguments.


This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.