-1

I need to create a script that ..

copy original documents from any portable hard drive or memory stick to an archive without creating unnecessary duplicates.

copy .doc files and .pdf but no duplicates if the files are the same.

The script must make a directory if one doesn't already exist

and if one doesn't exist it must report an error.

Can anyone help?

G-Moffat
  • 29
  • 2

2 Answers2

0

Your question is very abstract, maybe you could provide an example.

But I think you are looking for rsync.

rsync -ar dir1/ dir2

Synchronize directory 1 to directory 2 and prevents group, owner time ...

Alexander Baltasar
  • 1,044
  • 1
  • 12
  • 25
0

Check how to create script: link

How to copy: Link

Portable device: Link

Handling .doc .pdf suffix link

Introduction to if: link

Community
  • 1
  • 1
Noproblem
  • 745
  • 1
  • 6
  • 15