Search found 11 matches
- 23 Mar 2012 11:46
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
Yes that did the trick... I had the orginal issue so I place the SET command at top so that I would not have the parentheses issue. Thanks for your help..Your solution ours works great. I am going to try the following: @echo off set "TCRLF=CHR^(126^)+CHR^(13^)+CHR^(10^)" set "CRLF=CHR...
- 23 Mar 2012 10:59
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
CHRTOCHR is an exe that replaces characters. So I tried your examples and they worked perfectly. The files were all listed correctly and the file is processed in the seocnd example. It appears to me that when I use the for loop it doesn't work. for %%a in (*.835) do ( C:\PROCESSFILES\CHRTOCHR "...
- 23 Mar 2012 07:53
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
I tried both those as I remembered about the "CALL" function. What I think is my issue is that the first time the procedure is called I get a bogus first file name CHRTOCHR %a CHR(126)+CHR(13)+CHR(10) CHR(126) ERA.TXT The above is the actual text that is displayed and the program bombs and...
- 23 Mar 2012 01:05
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
One thing that I did notice is that the first time through I get the following CHRTOCHR %a CHR(126)+CHR(13)+CHR(10) CHR(126) ERA.TXT and the Pause does not stop. Then I do get a real file CHRTOCHR ERAOO1.835 CHR(126)+CHR(13)+CHR(10) CHR(126) ERA.TXT and the pause appears on the screen. I have to go ...
- 23 Mar 2012 00:53
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
Yes it does but here is my code that is not working: set "SECONDSRC=C:\PROCESSFILES\SECOND" set "OUTPUTDIR=C:\PROCESSFILES\SECOND\DONE" set "TCRLF=CHR(126)+CHR(13)+CHR(10)" set "CRLF=CHR(126)" pushd "%secondsrc%" for %%a in (*.835) do ( CHRTOCHR %%a ...
- 22 Mar 2012 16:58
- Forum: DOS Batch Forum
- Topic: Renamig File with Underscores
- Replies: 2
- Views: 3155
Re: Renamig File with Underscores
No need..I searched the board and found a cool batch file of token form ..I think agerman or ifoxfire..The memory is not good here but thanks
- 22 Mar 2012 16:35
- Forum: DOS Batch Forum
- Topic: Renamig File with Underscores
- Replies: 2
- Views: 3155
Renamig File with Underscores
I have numerous files with the following structure REMIT_1902803315_NON_0_20120316_Z120762523_1953760980.835 What I would like to do is rename the files to use the 2nd and 6th token by underscore so the batch file would rename the file to 1902803315_Z120762523.835 I have seen some code to get rid of...
- 22 Mar 2012 15:55
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
Okay this works great. I tried embedding the following Utility program called CHRTOCHR and this batch does not work. Any suggestions? This Utility will also remove characters from a file set "OUTPUTDIR=C:\PROCESSFILES\SECOND\DONE" for /f "delims=" %%a in ('dir /a-d /b') do ( CHRT...
- 22 Mar 2012 11:47
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
Works great!!!!
I am being lazy and I will look at the board BUT you may be faster..
At the end after the first move I would like to move the file to a another location..a subdiretcoy called DONE so I don't have to process the file again.
Thanks
Casti
I am being lazy and I will look at the board BUT you may be faster..
At the end after the first move I would like to move the file to a another location..a subdiretcoy called DONE so I don't have to process the file again.
Thanks
Casti

- 22 Mar 2012 11:36
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Re: Batch file to go through directory and remove characters
Thanks for the quick response ..I will test it right now!!!
Casti
Casti

- 22 Mar 2012 11:04
- Forum: DOS Batch Forum
- Topic: Batch file to go through directory and remove characters
- Replies: 14
- Views: 10226
Batch file to go through directory and remove characters
I have tried looking through the board to do this and have not found all the information in one place so as a Noobie I really would appreciate some help. I am trying to loop through a directory of files: z:\cgi2009\data Go though each file and and remove CR LF or \n from each line in all the lines. ...