query : At one shot i want to modify the above all filenames present in one path with current date as mentioned like below
Since todays date is :04172019
What have you tried?
You need to loop over the files in the directory - the loop is not valid syntax; I'm trying to get you to understand how to solve your problem.
Sample works for Linux sed only
cd /path/to/files
loop
# this section is usable syntax
read filename
newfilename=$(echo "$filename" | sed -E 's/[0-9]{8}/04172019/g' )
# mv $filename $newfilename # # Remove the leading # when this works for you
echo "$filename -> $newfilename"
end loop
You really should tell us your exact OS and shell.
You really should answer ALL questions asked in post #2. Your C:/shan path implys you're on a windows system. What's your *nix flavour, again? Your shell? And, when trying to apply / adapt jim mcnamara's pseudo code, where are you stuck?