Computing.Net > Forums > Disk Operating System > Copy help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copy help

Reply to Message Icon

Name: Robin
Date: November 11, 1998 at 19:03:55 Pacific
Comment:

Hi,
A batch file I am working on copys 5 files together.
Files 1,3,5 are files I have created and copy perfectly.(if copied 1,3,5 are on the same line)

Files 2 and 4 are created by the computer and have End of line tags on them. So when the file are put together it comes out as
1,2
3,4
5

Instead of 1,2,3,4,5.

Any help in locating a eof tag remover or some code to get it off would be appreciated. The info in the two computer generated files changes every second or so ,so doing a fix manually wont do.

File 2 is a copy of the zip file using dir /B > two.dat

File 4 is a copy of the program name extracted from the file id and placed into
four.dat

The three contants are just html snipits and do not change.

Hope some one here is into batch files and can help.

Well thank you for any consideration you might give to this request for help.

Robin



Sponsored Link
Ads by Google

Response Number 1
Name: Igor M
Date: November 13, 1998 at 04:12:18 Pacific
Reply:

Hi,

As I understand you are copying all those files in one file with + sign. Try to use /B switch in the copy command. With that switch all files considered binary files and EOF characters would be ignored.

Good luck, Igor M


0

Response Number 2
Name: World Library
Date: November 13, 1998 at 18:31:43 Pacific
Reply:

Hi,
For some reason my computer ignores the /b switch. It might be the batch itself. It is a bit long, and complex. I am thinking that the /b switch is either ignored or in conflict with some thing else.

I did get hold of a program that has soved the problem though.

I have been working on this bat for almost three months and it is just a few lines away from being finished..........I have no idea what I will do then...........

I hate it when that happens......LOL

Well I do thank you for responding.:-)

Robin aka ......World Library


0

Response Number 3
Name: Chris
Date: November 25, 1998 at 22:30:51 Pacific
Reply:

The /b is probably not what you are looking for. As I understand you problem, you copy a group of files. Then some program tries to read the files from a single file containg what was once 5 separate files and it runs into a premature end of file mark.

The bad news is that I don't think that there is any way to strip off the extra end of file marks using statements in a .BAT file.

Have you thought of creating a program in whatever language you use that will make a new copy of the offending files that does not contain an end of file mark?

I don't really understand why the end of file mark gets copied. Every file has and end of file mark. When files are combined using COPY and +, the end of file mark should be used by COPY to determine when to end the copy of that file. Then when all 5 files have been copied, DOS will indicate end of file after the last file copied.

And when you go to read the combined file that you describe, how do you get past the end of file mark that you say follows file 2 on the combined file?

And why is the end of file mark at the end of files 2 and 4 different?

I thought that I was going to be of some help here, but I've ended up creating questions instead!


0

Response Number 4
Name: Chris
Date: November 25, 1998 at 22:41:36 Pacific
Reply:

Also, I saw some indication that the size of the .BAT file might be a cause for concern. I have a .BAT file that is 30k long and very complex. The only time that I have trouble with it is when I make a stupid mistake. I don't think that the size of a .BAT file is of concern.

The other size concern might be the size of a statement in a .BAT file. It's limited to 127 characters until you use DOS under WindowsNT. When working with the 127 byte restriction, use a cascading copy:
COPY A + B + C X1
COPY X1 + D + E + F X2
COPY X2 + G + H FULLFILE


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Copy help Batch files



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Copy help

I need DOS copy help..... www.computing.net/answers/dos/i-need-dos-copy-help/5592.html

DOS Path/File/Copy Help for Install www.computing.net/answers/dos/dos-pathfilecopy-help-for-install/3644.html

Copy help www.computing.net/answers/dos/copy-help/132.html