1

I have a batch script that creates a file through a cleartool command. Basically ClearCase activity information is read to file and analysed. After analysis, the file is deleted. All is good.

Later in the script an FTP command (using PSFTP) is called to delete a file on an FTP server. This command produces output and that output is written where? To the file that was created and deleted of course! I have no idea why. I have even tried to gobble the output of the FTP call by adding >nul 2>nul at the end. All this does is resurrect the deleted file but this time it doesn't append anything. It's as though it was never deleted. Whatsmore, the script uses this as an opportunity to append pretty much and message to the file.

I have even tried to delete the file and folder manually at the end of the script, but it all stays (even with the /f flag).

Any ideas would be greatly appreciated! Maybe there is a sort ot IO stream left open or whatever the CMD equivalent is...

Thank you and best regards,

Andrew

Andrew
  • 293
  • 6
  • 14

1 Answers1

0

As long as your script doesn't start a cleartool session, but does a serie of cleartool commands:

cleartool command1
cleartool command2
...

You should be able to redirect the output/stderr of those commands in a file, which should be independent of any future sftp command.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250