file already exists
See original GitHub issueWe have .env
and .env.development
files in the C:\projects\xxx\
.
Running cpy gives:
$ npx cpy './.env.development' './.env'
Cannot copy from `C:\projects\xxx\.env.development` to `C:\projects\xxx\.env\.env.development`: Cannot create directory `C:\projects\xxx\.env`: EEXIST: file already exists, mkdir 'C:\projects\xxx\.env'
Is that the expected result? Is there a workaround? @sindresorhus
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Message - The file already exists. Do you want to overwrite it?
Press Yes to overwrite the existing file with a new one. Press Cancel to abort the operation. See Also. Exporting Test Results.
Read more >Fix File Already Exists
The error message "File Already Exists" or "File Already in Use" indicates that a file CTI Navigator Desktop is attempting to use is...
Read more >The file <filename> already exists. Do you want to replace it?
If you click Cancel, you can change the name of the file that's already in your destination directory so you don't overwrite it,...
Read more >Cannot Create a File When That File Already Exists ... - YouTube
Cannot Create a File When That File Already Exists In Windows 10/8/7 FIX [Tutorial].Several users are reportedly getting the “Cannot create ...
Read more >[FIXED] Cannot Create a File When That File Already Exists
If you want to Get Rid of Cannot Create a File When That File Already Exists Error Issue then just Check this cannot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see… Do you think we can solve this or are you happy with
shx
? I’m a user of this cli myself and one-to-one file copying works fine. But API can always be improved, it’s just we have to draw up a persuasive case first. What do you think @dy ?Yeah, that’s a bug in
cpy
. It should allow the the destination to be a file if the source is just one file and the destination doesn’t already exist as a directory.