TCL function to compress a file using UNIX compress

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TCL function to compress a file using UNIX compress

  • Creator
    Topic
  • #53106
    Faraz Khan
    Participant

      proc fnCompressAFile { fileToCompress args } {

             if { [ file exists $fileToCompress ] } {

                    if [ catch {exec compress -vf $fileToCompress} err ] {

                         return $err

                     }

                     return 0

             }

         return 1

      }

      Usage: fnCompressAFile $filenameToCompress

    Viewing 0 reply threads
    • Author
      Replies
      • #76592
        garry r fisher
        Participant

          Hi,

          I think these should be posted to the Tcl Library section rather than the Cloverleaf section.

          I appreciate they are very simple scripts that some note about them would also be useful rather than just posting a function.

          Regards

          Garry

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.