Manipulation of directories and/or files.

Directory navigation

cd(*subdir[, mkdir, cwd, back_check])

Get the full pathname of a directory (or file).

ccd(*subdir, **kwargs)

Get the full pathname of a directory (or file), given an altered working directory.

cdd(*subdir[, data_dir, mkdir])

Get the full pathname of a directory (or file) under data_dir.

cd_data(*subdir[, data_dir, mkdir])

Get the full pathname of a directory (or file) under data_dir of a package.

find_executable(name[, options, target])

Get pathname of an executable file for a specified application.

Directory validation


Convert path to an uniformat (Linux) file path, which is executable in Windows, Linux and macOS.


An alternative to the function path2linux().


Check whether a directory-like string is a (valid) directory name.

validate_dir([path_to_dir, subdir, msg])

Validate the pathname of a directory.

validate_filename(file_pathname[, suffix_num])

If the filename exist, then create new filename with a suffix such as "(1)", "(2)", and so on.

get_file_pathnames(path_to_dir[, file_ext, ...])

Get all files in the folder with the specified file type.

check_files_exist(filenames, path_to_dir)

Check if queried files exist in a given directory.

Directory/file control

delete_dir(path_to_dir[, ...])

Delete a directory or directories.