Hello liddler,
Thanks for the info.. the script doesn't work but it's probably 90% there..
When I run the script.. (sh script) I get this output:
mv: cannot access archive #this is the directory
mv: cannot access export1.htm
mv: cannot access export1.css
but if I run this command manually then it works:
mv export1.htm Archive/export1.htm.`date +%y%m%d`
Any ideas? It looks like it's getting to the directory where the files are.. it just can't seem to move them...
I upped the points by an extra 50..
Thanks!
Chad
Main Topics
Browse All Topics





by: liddlerPosted on 2003-04-25 at 06:45:35ID: 8395236
#!/bin/ksh te +%y%m%d`
for file in `ls /export_dir`
do
mv $file /path/to/archive/$file.`da
done
automate this by running it from cron, say once a day
crontab -e
0 4 * * * /path/to/script
would run it at 4am each day