Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Add Comment
Please, Sign In to add comment