Files

Frends.Files.Copy / 2.0.0

Summary

Copies the files in a directory that match a pattern to another directory, reporting successes and failures separately rather than stopping at the first problem.

Typical use — fan-out to several destinations, where the split result lets a Process react to partial failure

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Input parameters.

Name Type Default Example Description
Directory String – c:\temp

Source directory.

Pattern String "**\Folder\*.xml" **/Folder/*.xml, Folder/*.txt, report-*.csv, <regex>^(?!prof).*_test.txt

Pattern to match relative to Directory. Matching is case-insensitive and separators are normalized to /. For regex mode, prefix the pattern with and the matcher checks the full relative path and filename. For wildcard mode, * and ** work as glob operators and regex special characters are treated literally.

TargetDirectory String "d:\backup" d:\backup\

Target directory where the found files should be copied to

An unhandled error has occurred. Reload 🗙