akapas
asked on
Copying files with the same extension from a folder with subfolders
Hi,
I'd like to copy all the pdfs that reside within all the folders withing one folder.I tried this, but it didn;t work. It says 'no match'.
cp -r /Users/desiree/Library/Pag e\ Sender/In/*.pdf /Users/desiree/Desktop/Pdf s
The computer is an OS X machine not Linux, but that didn't seem to matter much with other commands. :-)
Any ideas?
Thanks,
agi
I'd like to copy all the pdfs that reside within all the folders withing one folder.I tried this, but it didn;t work. It says 'no match'.
cp -r /Users/desiree/Library/Pag
The computer is an OS X machine not Linux, but that didn't seem to matter much with other commands. :-)
Any ideas?
Thanks,
agi
Cut&paste error... Sorry about this.
find "/Users/desiree/Library/Pa ge Sender/In" -name "*pdf" -exec cp {} /Users/desiree/Desktop/Pdf s \;
find "/Users/desiree/Library/Pa
ASKER
Thanks, but didn't work. It says "No such file or directory".
Agi
Agi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, I'm still new here, wasn't sure how to accept.
ASKER
Thanks. :-)
The copy command does not recursively copy files, you need to call find first to search for all PDF files, and then copy the files that were found.