AIX Scripting for File Manipulation

Hi,

Totally newbie in scripting. And need helps in preparing a script to help me to do file moving, renaming and even delete.

I have 2 directories.

  1. /FTP/new
  2. /FTP/backup

Scenario
a) I will be getting new text files (e.g NewFile23052013.txt) created in the directory #1 every day (let's say 10pm)
b) And there will be another script process those files.
c) Then what i need to do is to move the process file into the directory #2 (regardless of the sequence, backup can be done before the file is being processed) and at the same time, rename it to .bak (e.g NewFile23052013.bak)
d) Remove / delete the process file (e.g NewFile23052013.txt) from directory #1

My platform is AIX 6.1

Thanks,
Q

Welcome to the forum.

The correct approach is handle this case in the script mentioned in point (b) after processing is over.

Can you edit that script?