How to create folder using script
1. I wanna create a automation script to automatically run the software
2. I wanna create the folder with the format that the filename then date format. Thanks in advance. |
Hi LinpusKelvin,
What all you have tried so far ? Which software you want to run ? Can you please elaborate second requirement ? |
1. I "wanna" know if you have read the man pages for mkdir and date.
2. I "wanna" know why so many people on this forum type "wanna" when they mean "want to". 3. I "wanna" know if I'm the only person that this type of thing pisses off. Evo2. |
evo2: relax, sorry, i didnt know is such a sensitive words to u. Be COOL YA!!! Gentleman is a big word for u.
Dear vinaytp, These are my source code, use POSIX 'strftime'; $month=strftime("%m%d",localtime);#folder name month & year if ($buf=~/\(application (.*?) \)[\r\n]/) { $command = $1; if ($command =~ s/-O "(.*)"/-O "$application\/$month\/ $file"/) { $command="$application/appli $command"; print "[$command]\n"; system "$command"; } This source code create folder in the date format. Is it possible to create the folder same as the file name and date together. Is this clearer to u. thanks in advance |
Hi,
ok, I've calmed down now :-) Looks like you are writing in perl? Sorry not I'm not at all well versed in that language. However I think I can understand enough of it to know what you are trying to do. Would you be interested in writing this as a shell script? Evo2. |
Try using sprintf.
|
Thanks for reply guys, I need to use perl because is CentOS.
smeezekitty: may I know what language are you using. I am grateful for your reply. Thanks again |
Quote:
|
|
All times are GMT -5. The time now is 02:03 AM. |