file_rename_auto()
automatically renames your file to a better name while keeping the same folder structurefile_move_dir_auto()
automatically moves your file while keeping the same file name
Usage
file_rename_auto(new_name, old_file = .Last.value)
file_move_dir_auto(new_dir, old_file = .Last.value)
Advantages
Instead of calling fs::file_move("path/to/dir/file.R", "path/to/dir/new-file.R")
, you can just call
file_rename_auto("new-file", "path/to/dir/file.R")
Instead of calling fs::file_move("path/to/dir/file.R", "path/to/new-dir/file.R")
, you can just call
file_move_auto("new-dir", "path/to/dir/file.R")
If the functions are used in conjunction with file_move_temp_auto()
,