September 16, 2014 at 4:41 pm
Hi,
I have a folder contains 3 files with 3 different file names ending _datestamp.txt.
for example in my folder c:\filesfolder has companyAllDemo_09162014.txt, companyAllProd_09162014.txt & companyAllTrans_09162014.txt. i need to rename them & remove the date stamp, inside the same folder so the file names changes to companyAllDemo.txt, companyAllProd.txt & companyAllTrans.txt. any help, comment and feedback would be deeply appreciated.
September 17, 2014 at 7:12 am
I'd use a script task and make use of the methods in the My.Computer.FileSystem namespace.
September 17, 2014 at 9:10 am
Hi Grasshopper,
i am very new in ssis and is there a way, i can get an example. i tried to search but everyone is moving files then renaming it.
September 17, 2014 at 10:16 am
Are you trying to automate this as a daily task or a one off?
Personally I would create a script, either vbs or batch that renamed the files and schedule the script to run daily in task scheduler or an agent job, but that's just the way I have always done it.
September 17, 2014 at 1:05 pm
not daily basis but i guess i also use c# script to rename the files. thanks everyone..i do appreciate everyone's input..
January 3, 2015 at 5:50 am
I suggest everyone to try KrojamSoft BatchRenameFiles program. It’s really work for me.
January 3, 2015 at 7:51 am
REN *_09162014.txt *.txt
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
January 3, 2015 at 10:25 am
Michael L John (1/3/2015)
REN *_09162014.txt *.txt
+1000. I love the "old ways". So simple.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply