Moving files that I created using IPFS add

I am trying to move a file that I created using “IPFS add”. I would like to move it into a folder I created using IPFS files mkdir. When I try to move the file utilizing IPFS files mv, I get the error: Error: file does not exist

Any ideas?

1 Like

I assume you tried moving from /ipfs, which is not a valid operation - you need to use files cp (note that even though you use cp nothing is copied since everything is content addressed). The error is weird indeed.

Issue on github:

1 Like

Thank you for posting the question @eric.holobyn and @Magik6k for your response. Am I misunderstanding your solution or are we to ignore the error messages?

sudo ipfs files mv /ipfs/QmbexUtcEVNbNWyNqBif8DVfuMecJHiXGpJLj36FK66TNC /ipfs/CRS
Error: file does not exist


sudo ipfs files cp /ipfs/QmbexUtcEVNbNWyNqBif8DVfuMecJHiXGpJLj36FK66TNC /ipfs/CRS
Error: directory already has entry by that name

In either case the directory appears to be still empty

ipfs files ls /CRS

Perhaps the commands “ipfs files” cp & mv are still being perfected