Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: microsoft.public.sqlserver.programming Subject: Re: While FTP'g the archive attribute appears sometimes preventing me from renaming the filename using T-SQL Date: Tue, 01 Mar 2016 21:37:41 +0100 Organization: Erland Sommarskog Lines: 16 Message-ID: References: <7b633239-aa13-412f-8672-51bf3b46f89e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="98f98b120fff90837150ac61cbd6eb1c"; logging-data="26700"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IXNgKxQ2ZrJXPkw4weWP6" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:oLsKOVRF/D8lwquhoWt0NONgJ2Y= Xref: csiph.com microsoft.public.sqlserver.programming:31292 George Lewycky (gelewyc@nyct.com) writes: > I have a batch job running on SQL Server to GET an ascii file from an > AS/400 machine and after I process it I rename the file with a date > stamp using Transaction SQL (T-SQL) under SQL Server > > Its been running a few years without a hitch but this year the file > won't rename and I'm suspecting its due to the "A"rchive attribute being > set--but only its 5th time this year? My only comment is that this is good incentive to reimplement the operation in Powershell or SSIS. This stuff should not run from SQL Server at all. T-SQL is not a general-purpose programming language. -- Erland Sommarskog, Stockholm, esquel@sommarskog.se