Search found 11 matches

by Mothra
15 Dec 2017 12:45
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

Re: capturing column data from .txt file and comparing the values

Happy Friday aGerman! Hope your day has been really really good! Again, I appreciate all your experience, knowledge, time, and expertise :) I was so happy to go through such a comprehensive rundown of your code and be able to use what you provided to make a few additions of my own! I have learned so...
by Mothra
14 Dec 2017 11:06
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

Re: capturing column data from .txt file and comparing the values

Yeehaw! I believe I have accomplished: Swap X1 with X2 Swap Y2 with Y1 Here is the code I have written by taking inspiration from your code! @echo off &setlocal set "infile=Mapfil.asc" set "outfile=Mapfile_corrected.asc" >"%outfile%" ( for /f "delims=" %%i in ('type "%infile%"') do ( set "line=%%i" ...
by Mothra
14 Dec 2017 10:19
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

Re: capturing column data from .txt file and comparing the values

// Set options to ontrol the visiblity of environment variables in a bat file @echo off &setlocal // Set the file that the script is to use set "infile=Mapfil.asc" // Set the file that the script will output to set "outfile=Mapfile_corrected.asc" // Routing all of the calculations the .bat performs...
by Mothra
14 Dec 2017 10:01
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

Re: capturing column data from .txt file and comparing the values

The data fields in your file have fixed lengths which isn't that bad in this case. @echo off &setlocal set "infile=Mapfil.txt.asc" set "outfile=Mapfile_corrected.txt.asc" >"%outfile%" ( for /f "delims=" %%i in ('type "%infile%"') do ( set "line=%%i" setlocal EnableDelayedExpansion set "sBegin=!line...
by Mothra
13 Dec 2017 15:53
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

Re: capturing column data from .txt file and comparing the values

Most Certainly!
So sorry for the oversight on my behalf!
I hope this helps :)
Thank you for saying please! That was so kind!

Attached is the Mapfil file
thank you so much for replying
by Mothra
13 Dec 2017 12:13
Forum: DOS Batch Forum
Topic: capturing column data from .txt file and comparing the values
Replies: 10
Views: 7041

capturing column data from .txt file and comparing the values

Howdy! At my work I am having a somewhat particular issue; we work with map data and some of the current map data is incorrect/inconsistent. I have a Mapfil.txt file that contains all of the information related to a particular segment. A segment is a line (representing a road) that goes from (x1, x2...
by Mothra
05 Oct 2017 14:46
Forum: DOS Batch Forum
Topic: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script
Replies: 10
Views: 7992

Re: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script

Thank you so much for the explanation; your .bat/explanation + how long I've been poring over DOS tips, HELP menu, documentation, and other examples have given me a much clearer understanding of this somewhat esoteric tool. You are an angel, a saint, a wizard! I am in your debt and if ever you need ...
by Mothra
05 Oct 2017 09:50
Forum: DOS Batch Forum
Topic: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script
Replies: 10
Views: 7992

Re: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script

Altering CSV data using Batch isn't safe. Try carefully @echo off &setlocal for %%i in (*.txt) do ( set "filename=%%~ni" set "file=%%~i" <"%%~i" set /p "firstline=" call :proc_file ) pause exit /b :proc_file setlocal EnableDelayedExpansion if "!first...
by Mothra
04 Oct 2017 16:52
Forum: DOS Batch Forum
Topic: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script
Replies: 10
Views: 7992

Re: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script

I could kiss you all! Over the past week, in order to accomplish this task, I have written a C# script, a VB script, and a Powershell script that all did the same thing; only to learn that the server that the scripts were written for is operating on Windows 2003; making every one of my aforementione...
by Mothra
04 Oct 2017 16:44
Forum: DOS Batch Forum
Topic: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script
Replies: 10
Views: 7992

Re: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script

Squashman wrote:Read the file with a FOR /F command. The FOR command modifiers take care of removing surrounding quotes. Also you will not use AT. Create a Windows Scheduled task.

Bless you!
I was wondering if a scheduled task would be my best bet :)
by Mothra
03 Oct 2017 09:00
Forum: DOS Batch Forum
Topic: Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script
Replies: 10
Views: 7992

Remove leading quotation | Remove leading zeroes from a string of numeric characters | Automated Script

Howdy! Brand spanking new to BATCH DOS programming and I have been trying to do this for 3 days now and I am fairly deep down a rabbit hole I have been tasked with creating a batch file that will remove the leading zeroes from strings of data that are exported out of our software into a .txt file. I...