Using cygwin tar from a DOS window

Bill Stewart bstewart@iname.com
Wed Sep 2 21:53:24 GMT 2020


On Wed, Sep 2, 2020 at 3:30 PM Wayne Davison wrote:

Something like this seems to work fine (with very minimal testing):
>
> @echo off
> PATH=C:\cygwin64\bin
> C:\cygwin64\bin\tar %*
>

Keeping in mind that cmd.exe provides no environment variable scoping using
scripts, I would recommend setlocal/endlocal; example:

@echo off
setlocal enableextensions
rem set CYGPATH to cygwin "/bin" directory
set CYGPATH=C:\cygwin64\bin
set Path=%CYGPATH%;%Path%
"%CYGPATH%\tar" %*
endlocal

Bill


More information about the Cygwin mailing list