cp function not creating folder hierachy
Background:
I'm a multi-media designer who knows just enough programming skill to get myself by...
I've hacked together some PHP-CLI code that creates Bash files for me. Not the most elegant way to solve the problem but works well most of the time. In this case it creates a whole bunch of cp commands.
Problem:
My problem is that it won't create a folder hierarchy for files to land in.
Input:
cp -v /home/user/
Output:
cp: cannot stat `/home/
Analysis:
* When I make the folder structure manually the file copies fine
* Sometimes I get 'cp: target' instead of 'cp: cannot stat'
Question:
Is this just the nature of the cp function and you just have to programatically make the directory structure using mkdir before copying or am I using the function wrong? Or something else...
Thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Sébastien Corriveau
- Solved:
- Last query:
- Last reply: