Skip to contents

Strip a path from a filename

Usage

strip_path_from_filename(filename, path)

Arguments

filename

The filename including the full path

path

The path bit to strip

Value

The stripped filename(s)

Examples

strip_path_from_filename(
  "C:/temp/testdir/some_subdir/filename.txt",
  "C:/temp/testdir/"
);
#> Warning: Stripping seems to have failed!
#> 
#> C:/temp/testdir//some_subdir/filename.txt -> C:/temp/testdir/some_subdir/filename.txt
#> [1] "some_subdir/filename.txt"