Hey all, basically I'm trying to write a script to backup some files in seperate folders dependant on file type.
So if I have word files, spreadsheets and jpegs i end up with thusly named folders inside them.
each folder has 3 pieces of test data in it to ensure the cp actually works. It does.
What is killing me is that if I run the backup for say the JPEG folder I get:
/home/USER/files/JPEGs(where the three pieces of data are) pic1, pic2, pic3
My backup folder looks like:
/home/USER/backup/JPEGs pic1, pic2, pic3
If I delete say pic2 then re-run the backup I get this:
/home/USER/backup/JPEGs JPEGS(a dir with all 3 pics inside) pic1 pic3.
I'm using copy with -r which as far as I am aware would just replace the missing picture yet for some crazy reason it copys the entire dir into the dir where the pictures are!
I realise this makes little sense.... My brain is fried and this is annoying me, please help.
So if I have word files, spreadsheets and jpegs i end up with thusly named folders inside them.
each folder has 3 pieces of test data in it to ensure the cp actually works. It does.
What is killing me is that if I run the backup for say the JPEG folder I get:
/home/USER/files/JPEGs(where the three pieces of data are) pic1, pic2, pic3
My backup folder looks like:
/home/USER/backup/JPEGs pic1, pic2, pic3
If I delete say pic2 then re-run the backup I get this:
/home/USER/backup/JPEGs JPEGS(a dir with all 3 pics inside) pic1 pic3.
I'm using copy with -r which as far as I am aware would just replace the missing picture yet for some crazy reason it copys the entire dir into the dir where the pictures are!
I realise this makes little sense.... My brain is fried and this is annoying me, please help.