backup script


I need to write a script that will copy files with directories and sub-directories (5 or 6 depths) to another location (update mode would be appreciated) with the two additional rules:
1) copy only files with less than certain size (files those size are less than 100MB).
2) If the extension of a file is ".dat" copy only if the size of that file is less than 200kb.

Thanks for any help.

Hi there,

This is usually done using Bash or Python for the reason that they have their own built in file-handling functionalities. It basically means it would be quite a bit easier, using the right tools for the job - kind of thing.

If this is for an assignment, and target infrastructure is unix/linux, you will probably want to have a look at the Posic file system API, which, should be mentioned, is written in C.

All the best,
Topic archived. No new replies allowed.