Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: fmGetFileObject
Output.txt is an output file.
I want to call just the fmRemoveDups UDF from your FileMathUDFs, which I've placed in an external file, fmDedupe.wbt.
I've tried this:
Call("fmDedupe.wbt", "") fmRemoveDups("input.txt", "output.txt")But I know this isn't right and it generates a Param1 error ("...not a FileObject").
Do I have to do a FileOpen on both the input and output files prior to using fmRemoveDups?
Can you please correct my syntax? Thanks
Call("fmDedupe.wbt", "") ;?????? inny=fmGetFileObject("input.txt",1) outy=fmGetFileObject("output.txt",0) fmRemoveDups(inny,outy)However I see you can a file fmDdupe.wbt and it is somewhat unclear what that file is.
If it is simply all the UDFs MINUS the examples from the web board posting then that would be correct.
If the exampels were left in, or if not all the UDF's were included, then there may be *problems*
Personally I like to add the UDFs to my scripts - inline -
If you're not going to load up all the UDFs in that article, then the essential UDFs you'll need for this operation are:
fmGetFileObject fmVerifyObject fmRemoveDups fmSortFileand then to run it (you need to do a fmGetFileObject on both the inny and outy):
inny=fmGetFileObject("c:\temp\filein.txt",1) outy=fmGetFileObject("c:\temp\fileout.txt",0) fmRemoveDups(inny,outy)
Article ID: W15333
File Created: 2002:09:05:13:51:22
Last Updated: 2002:09:05:13:51:22