But my tar executable is present only in the C drive. exactly what happends in my code is
cd C:\tar\bin
C:\tar\bin> tar -cf test.tar D:\coim\*.gz
so the tar files get created under c:\tar\bin folder itself....
If i execute the command from the D drive it will throw an error
'tar' is not recognized as an internal or external command,
operable program or batch file.
Is there any option in tar command to create the files under different drive where the executabe is not available?
Thanks for your quick reply... its working fine.
i tried implementing it in different case as mentioned below
I have the tar.exe placed in my server and whose UNC is [\\lexington.group.com\test\tar](file://lexington.group.com/test/tar) so i mapped its Physical path as C:\Program files\tar and
my source files are present under [](file://lexington.group.com/test/tar)[\\lexington.group.com\test\source](file://\\lexington.group.com\test\source) which has the physical path e:\tesst\aad
so i have given the commands in the batch script to tar as
cd e:\tesst\aad
"C:\Program files\tar" --remove-files -pcf test.tar test_*.xml
Though the command shows no error, tar file is not placed under the path e:\tesst\aad
Any ideas why i could'nt find the tar file under e:\tesst\aad?
Another doubt
C:\tar\bin\> tar -C D:\coim -cf test.tar D:\coim\*.gz
this command is placing the test.tar file only under C:\tar\bin is there any change to be made on the command to place it under D:\coim?