Mic | 1 Feb 2005 12:15
Picon
Favicon

Re: Validating Text Strings & Isolating files with odd characters


On Mon, 31 Jan 2005 07:25:03 -0000, awnster wrote:

> I am currently using Windows 2000 and have a batch job which backup 
> (copy) the text files in c:\stage to c:\backup and move the files 
> from c:\stage to c:\upload. What I would like to do is add the logic 
> to the batch script to do three things:

Can you post the current batch file, and also provide some more detail
about the following.

> 1) Check the text files if it contain the letter "A" qualifier (3rd 
> character from the left in the example) in the HDR record (example: 
> HDR*A*ADDRESS*APPLICATION123456789).

R is the third character from the left, above.
* is the fouth from the left.

> 2) Check for odd characters, for this example we can use the tilde 
> character "~".

What do you mean by odd?  1,3,5,7,9?

> 3) Move files that does not have the "A" qualifier or contain the 
> tilde character "~" to c:\error\errorlog.txt.

Do these text files contain any characters that are not alphanumeric?

--

-- 
Regards,
(Continue reading)

awnster | 1 Feb 2005 22:41
Picon
Favicon

Re: Validating Text Strings & Isolating files with odd characters


Mic,

Thank you for your help. I'm looking forward to your next response. 
Below is my current batch job:

if not exist c:\stage\* goto END
copy /Y c:\stage\*.ord c:\backup\
move /Y c:\stage\*.ord c:\upload\
:END

Sorry for the confusions. Here are some clarifications to my previous 
message:

1) Check the text files if it contain the letter "A" qualifier (3rd 
character from the left in the example) in the HDR record. example: 
HDR*A*ADDRESS*APPLICATION123456789).

Q: R is the third character from the left, above. * is the fouth from 
the left.
A: The letter "A" qualifier is the 5th character from the left.

2) Check for odd characters, for this example we can use the tilde 
character "~".

Q: What do you mean by odd?  1,3,5,7,9?
A: Odd character such as "ñ" and square shape characters (are
these 
control charaters?). I am using the "~" instead of the square 
character since I cannot copy & paste the square character to the 
(Continue reading)

Mic | 2 Feb 2005 00:17
Picon
Favicon

Re: Validating Text Strings & Isolating files with odd characters


On Tue, 01 Feb 2005 21:41:02 -0000, awnster wrote:

> Sorry for the confusions. Here are some clarifications to my previous 
> message:
> 
> 1) Check the text files if it contain the letter "A" qualifier (3rd 
> character from the left in the example) in the HDR record. example: 
> HDR*A*ADDRESS*APPLICATION123456789).
> 
> Q: R is the third character from the left, above. * is the fouth from 
> the left.
> A: The letter "A" qualifier is the 5th character from the left.
> 
> 2) Check for odd characters, for this example we can use the tilde 
> character "~".
> 
> Q: What do you mean by odd?  1,3,5,7,9?
> A: Odd character such as "ñ" and square shape characters (are
> these 
> control charaters?). I am using the "~" instead of the square 
> character since I cannot copy & paste the square character to the 
> message.   
>  
> 3) Move files that does not have the "A" qualifier or contain the 
> tilde character "~" to c:\error\errorlog.txt.
> 
> Q: Do these text files contain any characters that are not 
> alphanumeric?
> A: Yes, it can have *, #, -, &, $, etc. 
(Continue reading)


Gmane