Page 1 of 1
Hashed file cleaning/deletinf
Posted: Thu Nov 04, 2004 9:30 am
by berettae
Hi all, i'm working in DW project and dediced to store the hashed file in a directory (different from the project one) using the command directory in the hashed file stage.
but when i tried to use the UV routine DELETE FILE or CLEAR FILE the routine look for the file in the project directotry not finding them.
How can i specify the hashed file directory in the clear or delete routine?
TX
Posted: Thu Nov 04, 2004 9:40 am
by Amos.Rosmarin
This issue was discussed many times in this forum, you can do CLEAR.FILE only for registered files (like ones created under DS account) or delete the file directory and the D_ file.
a routine example :
Code: Select all
If System(91) Then ; * Windows system
Delim = '\'
delCmd = ' DEL /S ' : directoryPath : Delim : hashFileName : ' && DEL /S ' : directoryPath : Delim : 'D_' : hashFileName
os = 'NT'
End Else ; * Unix
Delim = '/'
delCmd = ' \rm -rf ' : directoryPath : Delim : hashFileName : ' && \rm -f ' : directoryPath : Delim : 'D_' : hashFileName
os = 'UNIX'
End
Call DSExecute (os, delCmd , Output, SystemReturnCode)
If SystemReturnCode <> 0 Then
Call DSLogWarn('The del hash file command (':delCmd:') returned status ':SystemReturnCode:':':@FM:Output, RoutineName )
End Else
Call DSLogInfo('Hash file ' : hashFileName : ' was deleted...',RoutineName )
End
Ans = SystemReturnCode
Return(Ans)
Posted: Thu Jul 12, 2007 11:02 am
by rajendran77
Thanks for your detail code. Much appriciated. It helps me to solve my issue.
Posted: Thu Jul 12, 2007 1:56 pm
by ray.wurlod
Once you have solved it, please mark this thread as resolved.
There is a third possibility; if the hashed file was created using a UV stage, then it must be dropped with a DROP TABLE command executed at TCL.