Hi I'm trying to use R to control unzipping a file.
I've added 7z into PATH, and did
7z e hat.2015-09-26T01-10-02.gz
and it worked.
Now in R, i'm in the same directory, and i tried
> command1 = paste0('7z e ', drop.file)
> command1
[1] "7z e hat.2015-09-26T01-10-02.gz"
> system(command1, intern=T)
Error in system(command1, intern = T) : '7z' not found
> system2(command1)
Warning message:
running command '"7z e hat.2015-09-26T01-10-02.gz"' had status 127
> shell(command1)
'7z' is not recognized as an internal or external command,
operable program or batch file.
Warning messages:
1: running command 'C:\Windows\system32\cmd.exe /c 7z e hat.2015-09-26T01-10-02.gz' had status 1
2: In shell(command1) :
'7z e hat.2015-09-26T01-10-02.gz' execution failed with error code 1
It's little bit raw, but try this out (:
Only Windows. It's uses CMD
Try like: