05-12-2008
Appending date to filename
hi
i need to rename a.txt to a_12052008.txt using the batch file
i used reanme a.txt a_%date%.txt ......but its done nothing
am using win2000 professional edition.
system date format is : The current date is: Mon 2008-05-12
can anyone help me to rename
thanks
aemu
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am wanting to automate a process that includes the step of appending to a filename a string of text that's contained inside the file. I.e. if filename A.fileA contains a string of text that reads 1234 after the phrase ABC, I want the shell script file to rename the file 1234_FileChecked_A.fileA.... (3 Replies)
Discussion started by: HLee1981
3 Replies
2. Shell Programming and Scripting
Hi experts . . .
Sunsolaris 9 version
I have the script as below:
Am getting log file as : archive_today_.log
Please suggest.
##################################################
set 'date'
dd=$3
mon=$2
export mon
yyyy=$6
export yyyy
cd /oracle/P47/saparch (4 Replies)
Discussion started by: vrjalli
4 Replies
3. Shell Programming and Scripting
hi All,
Searched forum but couldn't find a solution to this problem:
How can I append a file with date in the ninth line?
ie I want to insert a line with the current date and time in the ninth line.
I tried this:
date=`date`
awk 'NR==9 {printf "'$date' \n"} {print $0}' abc.log
below... (10 Replies)
Discussion started by: Sreejith_VK
10 Replies
4. Shell Programming and Scripting
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Discussion started by: govindts
3 Replies
5. Shell Programming and Scripting
Hi,
I have a directory with around 100k files and files with varying sizes(10GB files to as low as 5KB). All the files are having pipe dilimited records.
I need to append 7 pipes to the end of each record, in each file whose name contains _X3_ and need to append 10 pipes to the end of each... (3 Replies)
Discussion started by: nss280
3 Replies
6. Shell Programming and Scripting
I am using ksh93 on Solaris.
Ok, this may seem like a simple request at first. I have a directory that contains sets of files with a YYYYMMDD component to the name, along with other files of different filespecs. something like this:
20110501_1.dat
20110501_2.dat
20110501_3.dat... (2 Replies)
Discussion started by: gary_w
2 Replies
7. Shell Programming and Scripting
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Discussion started by: nbsparks
5 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
I have serveral directories like this:
(2013) blablabla(blabla) - blabla (blabla)
or
(1997) blablabla(blabla) - blabla (blabla)
and have to rename them to something like that:
blablabla(blabla) - blabla (blabla) (2013)
and
blablabla(blabla) - blabla (blabla) (1997)
Easy... (2 Replies)
Discussion started by: Nateshift
2 Replies
9. UNIX for Beginners Questions & Answers
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
10. UNIX for Beginners Questions & Answers
Suppose i have a list of files in a directory as mentioned below
1. Shankar_04152019_ny.txt
2. Gopi_shan_03122019_mi.txt
3. Siva_mourya_02242019_nd.txt
..
.
.
.
.
1000 . Jiva_surya_02282019_nd.txt
query : At one shot i want to modify the above all filenames present in one path with... (4 Replies)
Discussion started by: Shankar455
4 Replies