For running LASzip from the command prompt window it is also necessary to specify the path of the input file.
For example, suppose the laszip.exe file is installed under the drive D: (D:\LASzip\laszip.exe) and that the .laz files are stored in D:\lidar.
Then, type:
D:\LASzip\laszip D:\lidar\*.laz
It will decompress all LAZ files in the current folder overwriting any
existing file. The output files will have same name as the input files (but with extension .las).
Some remarks:
- it is not necessary to type the file extension '.exe' in the command-line.
- one can also use the identifier
-i
for input parameter, but it is optional: D:\LASzip\laszip -i D:\lidar\*.laz
.
- the identifier
-odir
can be used to specify a different output folder: D:\LASzip\laszip -i D:\lidar\*.laz -odir D:\lidar\output
. It will save all .laz files with the same file names (except for .las extension) in the specified output folder. See Saving LAZ files to different location from input (LAS) files?.
- use the identifier
-odix
to append to output file names: D:\LASzip\laszip -i D:\lidar\*.laz -odir D:\lidar\output -odix _decompressed
. It means if the input file name is point_cloud_27.laz
, the output file name will be point_cloud_27_decompressed.las
.
See more examples here.
Another option (in relation to first example) is to proceed as suggested by Barbarossa, i.e., open the cmd from the input file folder and write the command as in your first attempt.
REM move to folder where the input file is, then run laszip.
cd D:\lidar
D:\LASzip\laszip *.laz
If you want to call laszip
directly from any folder without specifying the program path, then, berniejconnors's answer gives a good hint to add it in the environment variables (see here).
laszip D:\lidar\*.laz
All examples here work the other way around, i.e., converting from .las
files to .laz
.