Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 How to create date stamp to exec code

Author  Topic 

satya068
Posting Yak Master

233 Posts

Posted - 2010-09-16 : 15:03:26
Hello Friends,
i reposted this question from sql administrator forum, suggested that this is the wright place
This is my exec code for taking back-up
exec( 'cmd','copy \\\\emp_di_go1\\Reality\\DATA_DAY\SAL_DATA_DAY.TXT \\\\emp_di_go1\\Reality\\DATA_DAY_BACK_UP', 8 );

after copying the txt file into back-up folder i would like to rename with date extension(ex:SAL_DATA_DAY.TXT16092010)and for every month it should automaticallycreate a sub folder with that month name and all files should store in that month folder with date extension,this will be easy to trace the file.

could this possible?if possible what code should i add to my exec.

Thanx in advance.

Satya

Satya

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-09-16 : 15:32:34
http://msdn.microsoft.com/en-us/library/d6dw7aeh(v=VS.85).aspx
Go to Top of Page

satya068
Posting Yak Master

233 Posts

Posted - 2010-09-16 : 15:54:09
thanx russel,
can you please tell me in which platform i can use this VB script.

Satya
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-09-16 : 18:59:46
windows. you can make a step in your import job of type ActiveX script and use vbScript for that.
Go to Top of Page
   

- Advertisement -