Guest User

Untitled

a guest
Jan 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/bin/sh
  2. # This is comment!
  3. echo Hello World
  4. for file1 in /C:/Users/shubham.tomar/Desktop/Shell/Test1/*;
  5. do
  6. filename1=$(basename "$file1")
  7. echo $filename1
  8. echo "------------------------"
  9. for file2 in /C:/Users/shubham.tomar/Desktop/Shell/Test2/*;
  10. do
  11. filename2=$(basename "$file2")
  12. echo $filename2
  13. if [["filename1" = "filename2"]]; then
  14. echo "---File matched---"
  15. else
  16. mv -f /C:/Users/shubham.tomar/Desktop/Shell/Test2/$filename2 /C:/Users/shubham.tomar/Desktop/Shell/Moved/
  17. fi
  18. echo "--------------File Moved-----------"
  19. done
  20. done
Add Comment
Please, Sign In to add comment