How to append time to folder
Hi i just want to create a folder with current time.
For example. foldername_09042010 How do i modify mkdir or write script to do this? |
You can try command substitution, e.g.
Code:
mkdir foldername_$(date +%d%m%Y) Code:
mkdir foldername_$(date +%Y%m%d) |
FolderName='WIN2003-SP2'
Directory_Name=$FolderName_$(date +%Y%m%d) How can i do above task? Thanks for the quick reply. |
Thanks colucix,
I tried the following Code:
mkdir foldername_$(date +%d-%m-%Y) foldername_09-04-2010 Its nice to have experienced people like you here ! |
@pinga123: you have to keep the variable name separated from the underscore. Use the complete syntax for parameter substitution with brackets:
Code:
Directory_Name=${FolderName}_$(date +%Y%m%d) @anishakaul: You're welcome! :) |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 06:38 PM. |