#!/bin/sh
# This is comment!
echo Hello World
for file1 in /C:/Users/shubham.tomar/Desktop/Shell/Test1/*;
do
filename1=$(basename "$file1")
echo $filename1
echo "------------------------"
for file2 in /C:/Users/shubham.tomar/Desktop/Shell/Test2/*;
do
filename2=$(basename "$file2")
echo $filename2
if [["filename1" = "filename2"]]; then
echo "---File matched---"
else
mv -f /C:/Users/shubham.tomar/Desktop/Shell/Test2/$filename2 /C:/Users/shubham.tomar/Desktop/Shell/Moved/
fi
echo "--------------File Moved-----------"
done
done
**
NOTE ABOUT PROBLEM
**
There are some files in a particular path for ex: Desktop/Test1 and Downloads/Test2 I want to write a shell script to move all the files present in Test2 and not in Test1 to a path for ex: Documents/MovedFiles files may be of any type