move_file()¶
- audeer.move_file(src_path, dst_path)[source]¶
 Move a file independent of operating system.
As
os.rename()works differently under Unix and Windows andshutil.move()can be slow, we useos.replace()to move the file.Warning
audeer.move_file()is deprecated, please useaudeer.move()instead.- Parameters
 src_path – source file path
dst_path – destination file path
Examples
>>> path = audeer.mkdir("folder") >>> src_path = audeer.touch(path, "file1") >>> dst_path = os.path.join(path, "file2") >>> audeer.move_file(src_path, dst_path) >>> audeer.list_file_names(path, basenames=True) ['file2']