Can I Make A copy of a File in a script/
Ok here is what I am trying to do.
I run a SS session that creates a filename called abc_mm-dd-yy.txt. I run this session once a week and then the output is loaded into MySQL table via a script. However, I don't want to have to updated that MySQl script each time I run it (it runs via a task scheduler) to change the date on the file name. However, I need the versions of the text file saved to disk.
So I successfully (thanks Jason) created script at the beginning of my SS Session that creates the dated file name and all output goes into that file name. What I need is a script that copies that filename from abc_mm-dd-yy.txt to just abc.txt and keep the copy of abc_mm-dd-yy.txt on the disk. Essentially I will have two copies when it is done. The abc.txt file would be replacing whatever was there from the last time I ran the sessino.
This of course woudll all be easier if I could get the JDBC connection to work, but I would need this copy capability anyway for some other thinsg i do.
Thank you for your help.
-jim
You would just need to make a
You would just need to make a script that uses Java's file methods to do that. I don't have a sample of one to do that, but here is one from Sun's site that should help:
http://www.java2s.com/Code/Java/File-Input-Output/FileCopyinJava.htm