Hi
Any help appreciated
I have a text file it contains blocks of variable text see example 1 and I would like to edit the file to the format of Example 2
Example1
--------minus signs here
C:\Data\User -lots of spaces here and poss CR /LF
Work\dir1 2nd block appears tabbed
C:\Data\User1 -lots of spaces here and poss CR /LF
Work1\dir1
(109 files)--------this is now the end of the text file
etc etc
Example 2 this is what I would like to see:--
copy C:\Data\User\Work\dir1 *.adm F:\admin
copy C:\Data\User1\Work1\dir1 *.adm F:\admin
Not sure if this is possible have been able to put the copy bit in front of everything but thats it so far
Best Regards
Steve
editing a text file
Moderator: DosItHelp
-
- Posts: 16
- Joined: 29 Jan 2010 17:19
Re: editing a text file
im also new to coding, but if you want to edit a text file, all i have for a solution is:
Code: Select all
@echo off
cls
del TXTFILENAME.txt
echo. copy C:\Data\User\Work\dir1 *.adm F:\admin > TXTFILENAME.txt
echo. copy C:\Data\User1\Work1\dir1 *.adm F:\admin > TXTFILENAME.txt
ping localhost -n 2 >nul
exit
Re: editing a text file
thanks for reply my problem was -i have done it now is the stripping of all of the unwanted characters and inserting the extra copy bits
my solution is very complicated and involves 10 bat and some vbs stuff all from the web but now looks good but clunky
thanks again
stevieboy
my solution is very complicated and involves 10 bat and some vbs stuff all from the web but now looks good but clunky
thanks again
stevieboy