Learn R Programming

miceadds (version 2.2-0)

files_move: Moves Files from One Directory to Another Directory

Description

Moves older (defined in alphanumeric order) files from one directory to another directory.

Usage

files_move(path1, path2, file_sep = "__", pattern = NULL)

Arguments

path1
Original directory
path2
Target directory in which the files should be moved
file_sep
Separator for files
pattern
Pattern in file names to be searched for

See Also

filename_split

Examples

Run this code
## Not run: 
# #############################################################################
# # EXAMPLE 1: Move older files in '__ARCHIVE' directory
# #############################################################################	
# 
# # specify path
# path1 <- "p:/IPN/Projects/PISA/Trend_2015/2__Data/All_Waves/"
# # specify target directory which is an archive
# path2 <- file.path( path1 , "__ARCHIVE" )
# # move files
# files_move( path1 , path2 )
# ## End(Not run)

Run the code above in your browser using DataLab