Trivially done in PowerShell, assuming your requirements are completely stated.
C:\scripts\Stripcrlf.ps1 Param( [string]$path ) $path = $path.Replace( [char]0x0a, '' ) $path = $path.Replace( [char]0x0d, '' ) return $path >From cmd.exe Powershell -nologo -file c:\scripts\stripcrlf.ps1 %VARIABLE% -----Original Message----- From: Robert Jackson [mailto:r...@walkermartyn.co.uk] Sent: Wednesday, May 16, 2012 7:44 AM To: NT System Admin Issues Subject: RE: MakeTxt.exe or Equivalent Hi Ben, Many thanks for the reply. We dynamically build up a %PATH% location and store into a variable. At this point the content of that variable is a string that occupies a number of lines. The contents of the variable are then passed through MakeTxt.exe and the resultant output is a variable of the %PATH% location expressed as a single line of text.. -----Original Message----- From: Ben Scott [mailto:mailvor...@gmail.com] Sent: Wednesday 16 May 2012 12:28 To: NT System Admin Issues Subject: r...@walkermartyn.co.uk - Re: MakeTxt.exe or Equivalent - Bayesian Filter detected spam On Wed, May 16, 2012 at 7:03 AM, Robert Jackson <r...@walkermartyn.co.uk> wrote: > We are using a program MakeTxt.exe to strip out CR/LF's from a path > string we build up. Can you please give some context for that. I don't really get what's going on. The "FOR" built-in command can be used to read lines from a file and concatenate them into a single line, if that's what you're after. > ... Windows 2008 R2 server and find that I cannot use the program as > it is not compatible with 64bit. It's probably an old 16-bit DOS program. > As far as I can see, I cannot select the compatibility options for the > .exe as they are all greyed out. This is a hardware limitation. When in "long mode" (64-bit mode), x86 processors cannot execute 16-bit code. AMD decided it was time to make a break from the world of 16-bit when they designed their 64-bit x86 extensions. (And Intel copied AMD.) -- Ben ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ************************************************************************ The information in this internet E-mail is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is unauthorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of Walker Martyn Ltd or any of its affiliates. If you are not the intended recipient please contact administra...@walkermartyn.co.uk Walker Martyn Ltd, company number SC197533. Company is registered in Scotland and has its registered office at 1 Park Circus Place, Glasgow G3 6AH, UK. **************************************************************** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin