|
Answer» Hello,
I have a lot of files that need to be CONVERTED from .las to .txt. (LiDAR files to XYZ coordinates for CADD) I have the DOS program (.exe) to do this, but it will take forever to USE the program on all of the files. I am looking for a way to make a batch file that will read the .las file, convert it to the .txt file via the program, then move to the next file and continue. I am not exactly sure of the code to do this, any help would be greatly appreciated!
I have figured out the way to read the filenames and merge them together, then converting them, but the final file size is extremely large. I need to figure out a way to do each file separately.
Thanks! RichHello. This should WORK.
Code: [Select]@Echo off Title Renaming! :Main set /p "doc=[ Enter the file name ] :" echo. set /p "ndoc=[ Enter new file name ] :" goto Y1 :Y1 cls Title Renaming! echo Is this what you want? echo %doc%.las to %ndoc%.txt? echo. set /p "ans=[ Y / y or N / n] :" if "%ans%"=="Y" goto Y if "%ans%"=="y" goto Y if "%ans%"=="N" goto N if "%ans%"=="n" goto N pause :Y ren "%doc%".las "%ndoc%".txt goto R :R cls echo Want to redo? set /p "ans1=[ Y / y or N / n] :" if "%ans1%"=="Y" goto Main if "%ans1%"=="y" goto Main if "%ans1%"=="N" goto N if "%ans1%"=="n" goto N :N cls echo Have a good time! pause>nul exit I edited it to do only .Las to .Txt files.
BRI don't think that's what the OP means BR.
if you have a program to convert them already presumably all it needs is an input?
something like this Code: [Select]for /f %%A in ('dir /b /a:-d *.las') do (CONVERSION.exe %%A) That will take all the .las files and input them to your conversion exe.
FBFireballs.....
Thank you!!!
I already have a program that converts the files from .las to .txt. Your code works perfectly! You just saved me hour of useless work! Thanks again!It's always nice to help out, and thankyou for reporting your success so other people may benefit from this post.
"Pob lwc."
FB
|