| 1. |
Solve : Help needed.. batch commands? |
|
Answer» Hi Gurus, you would probably want an xcopy if there all in the same place. If not it be copy Driveletter:\were it is Driveletter:\Were you want it, I dont follow unless these arent notepad doc's there will be need for more code. I assume that its a doc file, I can only aid this far sorry. kayHi, Thanks for your reply.. It is not doc file. Example: File1.txt : PersonNo Name 1001 Alex 1002 Mac File2.txt : PersonNo Name 1003 Jack 1004 Nick Target.txt : The file where text from File1 & File2 to be copied After copy the the target file shoul looks as below Target.txt PersonNo Name 1001 Alex 1002 Mac 1003 Jack 1004 Nick Is it possible ? Regards, DD i seems to have a batch script to suit your work, i wrote it in the early days when i LEARN scripting, and it's messy code all around, but i've been using it in daily basis until TODAY and too lazy to clean-up the code. when noob like me write a batch code, there is a lot of unnecessary goto and label that i first think it is cool to modulize the coding into function and procedure in OOP TERM. download the attached batch file. how to use: Code: [Select]D:\batch>concat /? USAGE: concat [SOURCE DIRECTORY] [OUTPUT FILE] [HEADERLINENUMBER] [CUSTOMHEADER] D:\batch>concat ?.doc target.txt 1 target.txt not exist done 1.doc = 2 Line(s) done 2.doc = 2 Line(s) Total Files=2 File(s) D:\batch>type target.txt PersonNo Name 1001 Alex 1002 Mac 1003 Jack 1004 Nick [attachment deleted by admin]thanks for the aid, hope this all pains out I was thinking of linux abit sorry there so close to being the same. |
|