xcp icon indicating copy to clipboard operation
xcp copied to clipboard

Copy directory non recursively

Open jbd opened this issue 1 year ago • 0 comments

Hello,

For a lot a bad reasons beyond of my control, I have to deal (sometimes) with single directory with a lot files (millions) at the same level.

Right now, xcp has to use the -r/--recursive option when the source is a directory:

Error: Invalid source: Source is directory and --recursive not specified.

I'd like to use xcp to copy the content of this directory non-recursively. xcp would only copy files (and create empty directories ?).

It looks like xcp could leverage the min_depth/max_depth function of Walkdir builder to allow non recursive directory copy.

Sorry this is really an RFE without an associated pull request, but my rust skills are non-existent at the moment.

Thank you for this project. This is a fantastic contribution to the space of data movement.

Jean-Baptiste

jbd avatar Nov 22 '24 10:11 jbd