I'm trying to make bash script for ubuntu that will check for files in folder Downloads and copy everything that doesen't exist in Documents to Documents. But I'm stuck at checking if file exist, can somebody help me out?
#!/bin/bash
cd /home/rene/Downloads
for file in *
do
echo $file
if [ ! -f /home/rene/Documents/$file ]; then
echo "File not found!"
fi
done