Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy from multiple sources to multiple sources using pattern #121

Open
nermin99 opened this issue Dec 5, 2022 · 1 comment
Open

Copy from multiple sources to multiple sources using pattern #121

nermin99 opened this issue Dec 5, 2022 · 1 comment

Comments

@nermin99
Copy link

nermin99 commented Dec 5, 2022

I have these data.txt files I want to copy:

src
    d01
        index.ts
        data.txt
    d02
        index.ts
        data.txt

the destination is:

dist
    d01
        index.js
        index.js.map
    d02
        index.js
        index.js.map

So I was expecting that

copyfiles -u 2 src/d*/*.txt dist/d*
# or
# copyfiles -u 2 src/d*/data.txt dist/d*/data.txt

would yield

dist
    d01
        index.js
        index.js.map
        data.txt
    d02
        index.js
        index.js.map
        data.txt

but, at best, I only get that the second folder (d02) is populated and not both.

dist
    d01
        index.js
        index.js.map
    d02
        index.js
        index.js.map
        data.txt

Additionally, I get a "can't go up that far" error.

As you might've suspected this is for a TypeScript project.

@brunottonurb
Copy link

brunottonurb commented Mar 7, 2023

I have a similar issue where the glob src/**/*.less does not copy all files, only files one layer deep. AFAIK ** should work for an arbitrary level of subfolders, e.g. src/a/b/file.less, but it only works for src/a/file.less.
@nermin99 I ended up using cpy instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants