I Want to move ZIP into current date folder

Closed
Hiten - Mar 26, 2009 at 04:26 PM
jipicy Posts 40842 Registration date Wednesday August 27, 2003 Status Moderator Last seen August 10, 2020 - Mar 27, 2009 at 09:42 AM
Hello,

I would like to copy or move my zip file into the current dated folder in same run.

I have these code with me.


echo ""
echo "Enter OUTPUT_ZIP (eg. dft, dft1, dft2,...ban01, ban02, ban03)"
read op_name
echo ""
mkdir Sent/`date +%d-%m-%Y`
tar -cf tab_$op_name.tar tab_*
...................................................Now here i want to move my ZIP into current dated folder which created above in this same script.


Please suggest!
Thanks in advance.
Hiten.
Related:

1 response

jipicy Posts 40842 Registration date Wednesday August 27, 2003 Status Moderator Last seen August 10, 2020 17
Mar 27, 2009 at 09:42 AM
Hi,
DATE=`date +%d-%m-%Y`
echo ""
echo "Enter OUTPUT_ZIP (eg. dft, dft1, dft2,...ban01, ban02, ban03)"
read op_name
echo ""
mkdir -p Sent/${DATE}
tar -cf tab_${op_name}.tar tab_*  && mv   tab_${op_name}.tar   Sent/${DATE}/
0