Unix scripting renaming files
I have probably been working on this for 5+ hours (since im learning and trying to do this) but im trying to copy and rename all the files (and sub files) in a directory to include the date in them and move them to a folder. But only files that have the .pl4 extensions... I have it going through files but errors when i rename
Any help is appriciated.
This is probably the furthest i have gotten..
Update: A little better....
#! /bin/sh
for file in *.pl4; do STR=$file
echo $STR
CLEANSTR=$( date +%m-%d-%y )"$STR"
echo $CLEANSTR
cp ${file} pathloss/$CLEANSTR
done;
Last edited by Jay5487; 03-24-2008 at 08:51 AM.
|