Trouble with printing to other folders w/ awk

Again, I am in need of some advice.

Earlier I was shown how to have awk create folders for me. That was so cool and helpful, but now I am exploring the posibilities of combining operations with bash scripts.

Now, I am creating the directories with the bash script, and then I want awk to print to those directories. My first error is that I dont know how to open up communication between the shell proper and awk, which is annoying, but also I wanted the shell to date the directories, which was easy enough but I cant figure out how to have awk match those file names, seeing as the date is going to change... daily.

I am wondering, is there a way to use a regular expression in the output path, so it will always identify the first part of the directory name and the reg expression will identify the date?

Or, is there a way to work the date straight into the file path so that it updates with the system time as well. I am using:

date +%F

in the shell script, so my folder name is:

mkdir "iat_data_`date +%F`"

and I want awk to print files into that directory.

Thanks!

Try like this:...assuming the directory is already there.

awk  '{ print "value in new file" >"./dir_name/new_file" }'