Hi
I am very new to scripts and only have a basic knowledge
What i am trying to do is move files from one directory to another, but i need to make sure the file is stable before it moves the file to the destination. Here is the script that i am using that is moving the files, it part of a script another company used and i am trying to hack it around to suit. Any help would be appreciated and if there is a better way to do it please say so
#!/bin/sh
SOURCE_DIR=/appcfg/COLOURSERVE/OUT
BACKUP_DIR=/symlnks/io/jobs/workflows/TAG-461/Conde_Nast_Output
cd $SOURCE_DIR
mv -f * $BACKUP_DIR/
the destination folder is a hotfolder linked to a software program that has to process the file. So i need to ensure that the file has completed the copy to the destination
thanks
you can check it by adding something like "echo test test" in the next line after mv or cp, the echo command will only be executed when cp or mv is complete, that means when the file doesn't grow in the size any more.
It copies all files from the source directorye to the destination ( your script moved them - not so good) and when the job is done the script reports "Done."