Search found 8 matches

by VespaGS150
21 Jul 2016 02:50
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

foxidrive wrote:Try this code.

Code: Select all

type "C:\Folder1\FileA.txt" >> "C:\Folder2\FileB.txt"



Amazing! I'm a stupid: I thought that "type" is not part of the code :?
It works!!!
Many many thanks guys!
by VespaGS150
20 Jul 2016 01:36
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

If you happened to read the help for the COPY command That's a fanciful notion Squashman. People these days reading help for commands? It's more likely that SETI will find a whole mess of intelligent life. VespaGS150, try this code to begin with. It's all you really need for your situation due to t...
by VespaGS150
19 Jul 2016 07:40
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

Here you are my code. Where I can put the /B switch? set snfFrom=C:\FolderA\File.bak set snfTo=C:\FolderB\File.bak if exist %snfTo% goto mExist copy %snfFrom% %snfTo% goto mEx :mExist copy %snfTo%+%snfFrom% %snfTo% :mEx If you happened to read the help for the COPY command you will notice that the ...
by VespaGS150
19 Jul 2016 07:28
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

Here you are the wrong file and also the screenshot of the same wrong file opened with Notepad and Notepad++ You have EOF markers in there that you are concerned about. A hex viewer will show you the ascii number of each character and in hexadecimal the EOF character is 1A The flaw in your question...
by VespaGS150
19 Jul 2016 01:23
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

foxidrive wrote:Thanks Douglas.

VespaGS150, can you put the wrong file in a zip archive too please?



Thanks folks!

Here you are the wrong file and also the screenshot of the same wrong file opened with Notepad and Notepad++

https://we.tl/yYwWelbOb2
by VespaGS150
18 Jul 2016 06:32
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

Here you are the 3 files: FILEA+FILEB and the result of the append like expected https://we.tl/naNq2EVB3g As you can see, the resulting file doesn't have any visible CR/LF charcater With the script above, I have a visible CR/LF character (also if I open the file with notepad) Thanks a lot! GS
by VespaGS150
15 Jul 2016 03:18
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Re: Copy or Append

Thanks guys, it works well but when it appends multiples files, I have this situation: 04203119160715090500 ->02203115160418065800 02203113160418065900 where the -> is the CR/LF character. It is possible to append the two files without this chatacter? Example. File 1: 04203119160715090500 File 2: ...
by VespaGS150
13 Jul 2016 09:41
Forum: DOS Batch Forum
Topic: Copy or Append
Replies: 20
Views: 14918

Copy or Append

Hi all, I would create a batch file that copy a file to another directory but if the destination file still exists, the batch must append text to the existing destination file. In other words: Source: C:\Folder1\FileA.txt ; this file will change every day Destination: C:\Folder2\FileB.txt The FileB....