Search found 14 matches

by amichaelglg
06 Oct 2016 08:52
Forum: DOS Batch Forum
Topic: strip trailing CR/LF from text file.
Replies: 5
Views: 7128

Re: strip trailing CR/LF from text file.

thanks.

I only wanted to remove the very last code in the text file.
i.e remove any blank line at the end of the file.
by amichaelglg
06 Oct 2016 03:55
Forum: DOS Batch Forum
Topic: strip trailing CR/LF from text file.
Replies: 5
Views: 7128

strip trailing CR/LF from text file.

quite simply is it possible and how am i able to remove a cr/lf code from a text file if it's the last entry in the text file?
by amichaelglg
05 Jul 2011 06:26
Forum: DOS Batch Forum
Topic: file and text manipulation.....
Replies: 13
Views: 12129

Re: file and text manipulation.....

All good now.

Dave your a star - thanks again
by amichaelglg
05 Jul 2011 02:08
Forum: DOS Batch Forum
Topic: file and text manipulation.....
Replies: 13
Views: 12129

Re: file and text manipulation.....

might have to read that a few times to begin to understand it.

One small thing after running the script. It does manage to extract all the files and folders into a list , but they all end up in the notexists.txt file and I know for sure some do exist.

I appreciate very much the help.
by amichaelglg
04 Jul 2011 16:09
Forum: DOS Batch Forum
Topic: file and text manipulation.....
Replies: 13
Views: 12129

Re: file and text manipulation.....

thanks I will try this out tomorrow and....yes I am lost at what I am looking at and impressed at the same time. :)

someone did mention doing this in pearl - but it's not something I know. I thought I might understand something, but....
by amichaelglg
04 Jul 2011 11:57
Forum: DOS Batch Forum
Topic: file and text manipulation.....
Replies: 13
Views: 12129

file and text manipulation.....

I need to search through a text file and output into a new file anything starting with either E:\ or M:\ UPTO ending either a # sign or a space. Example current file: dsffdfe:\abc\cde rffrv m:\abc\efd# dfe:\abc\cde rffrv m:\abc\efd#m:\abc\ggg.lst # e:\abc\hhh Output should be: e:\abc\cde m:\abc\efd ...
by amichaelglg
14 Mar 2011 04:59
Forum: DOS Batch Forum
Topic: create new file from an extract of another.....
Replies: 5
Views: 5886

Re: create new file from an extract of another.....

Having entered the dos command: reg query "HKCU\Control Panel\International" If this helps ?): HKEY_CURRENT_USER\Control Panel\International iCountry REG_SZ 1 iCurrDigits REG_SZ 2 iCurrency REG_SZ 0 iDate REG_SZ 0 iDigits REG_SZ 2 iLZero REG_SZ 1 iMeasure REG_SZ 1 iNegCurr REG_SZ 0 iTime R...
by amichaelglg
14 Mar 2011 02:59
Forum: DOS Batch Forum
Topic: create new file from an extract of another.....
Replies: 5
Views: 5886

Re: create new file from an extract of another.....

thanks for the above. When I run it displays no output (errors) and creates no files. I am running on Windows Server 2003 SP2 - does that make a difference on where you are getting the registry info or anything else ? Additional (summary) note in case of confusion: 1.Search through all files in fold...
by amichaelglg
11 Mar 2011 06:13
Forum: DOS Batch Forum
Topic: create new file from an extract of another.....
Replies: 5
Views: 5886

create new file from an extract of another.....

Hi, here's another strange & difficult one I need help on please. Search through all files in specific folder. create a new file (in the same place) for each of those files using the following rule: search for first entry in each file that contains the current date, in the form 2011-03-11. copy ...
by amichaelglg
05 Mar 2011 10:58
Forum: DOS Batch Forum
Topic: not so staright forward dos script query.....
Replies: 8
Views: 11499

Re: not so staright forward dos script query.....

aGerman appears to have cracked it. !k revised version works to a certain degree, but in the example of file: c:\ANY_DIR\JOEY\run\ABCD it was going to c:\newfolder\ANY_DIR_JOEY_ABCD (i.e the 2 directory levels were concatenating when I really just wanted the 1 level below to be part of the new file ...
by amichaelglg
04 Mar 2011 16:14
Forum: DOS Batch Forum
Topic: not so staright forward dos script query.....
Replies: 8
Views: 11499

Re: not so staright forward dos script query.....

for some strange reason it's not working at all now ? and it seems to take a lot longer to run. Also I can't see where it specifically only searches in directories: c:\any_dir*\*\run\ (or c:\any_dir*\run\ ) for the file ABCD. It sounds like it's searching the whole of the c drive and something is no...
by amichaelglg
04 Mar 2011 12:26
Forum: DOS Batch Forum
Topic: not so staright forward dos script query.....
Replies: 8
Views: 11499

Re: not so staright forward dos script query.....

thanks, you make it look simple - like most things when you know how ! btw, I did mean the first example. It works to a certain point, but..... In my third example it is not picking/copying the file i,.e in the the case file c:\ANY_DIR\JOEY\run\ABCD to go to c:\newfolder\JOEY_ABCD It works for files...
by amichaelglg
04 Mar 2011 04:56
Forum: DOS Batch Forum
Topic: not so staright forward dos script query.....
Replies: 8
Views: 11499

not so staright forward dos script query.....

I have googled for ths left and right and centre and cannot find anything. Basically I need a script to search for the file ABCD which exists in various sub folders under folder c:\ANY_DIR*\run\ (and there are various ones). Ths file, ABCD is be put into one specific folder, therefore this will be o...