Hi, basically I'm trying to find files with a certain extension in a directory (this part works fine), and then zip those files to a different location.
This works fine for zipping them to the location they are found in:
Code:
find ../somedirectory -type f -name "*.txt" -exec zip "$(basename {})"zip {} \;
However I need to send the zip file to a different directory so I'm trying this with no luck:
Code:
find ../somedirectory -type f -name "*.txt" -exec zip "/someotherdirectory/$(basename {})"zip {} \;
I get this:
Code:
zip I/O error: No such file or directory
I'm sure this is something simple I am missing?