![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 00:23 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Questions about the COPY and xcopy commands |
| Printable Version 1,565 / 14 |
| Floor1 raysea007 | Posted 2008-01-08 22:57 |
| 初级用户 Posts 22 Credits 48 | |
|
The copy command can copy files. The copy command can also combine multiple files into one.
I still don't understand a lot about combining files, so I hope everyone can give me some pointers!! I used the copy command to combine two WMA music files, but they can't be played. My method was copy 001.wma + 002.wma 003.wma, and the combined file 003.wma could not be played. But when I used this method, copy 001.wma/b + 002.wma/b 003.wma, the file 003.wma made this way could be played, but what played was the file 001.wma. Likewise, if I use copy 002.wma/b + 001.wma/b 003.wma, what plays is 002.wma? So I want to ask everyone, when combining N files, does the final combined file X play the wma file right next to copy? I also have another question: since it's a combined file, is it possible to make them (N songs, where N depends on how many files are combined) play continuously? That is, after 001wma finishes, then play 002wma, and so on!! Thank you, everyone, for giving me some pointers. I'm still just learning, so I hope you can tell me? [ Last edited by raysea007 on 2008-1-14 at 08:49 PM ] |
|
| Floor2 bush | Posted 2008-01-09 01:13 |
| 银牌会员 Posts 730 Credits 2,165 | |
|
I've tried this method with mp3 and mpg, and it works (as long as the bitrate, sample rate, and channels are all the same).
But the wma file format is a bit more special. Its contents are not distributed evenly, so with a command like this copy /b 1.wma+2.wma+3.wma new.wma the new file you get will be recognized as a file with a damaged end. [ Last edited by bush on 2008-1-9 at 01:40 AM ] |
|
| Floor3 raysea007 | Posted 2008-01-09 02:52 |
| 初级用户 Posts 22 Credits 48 | |
|
Thanks. I'll go try it. Thank you, friend in the previous post.
|
|
| Floor4 raysea007 | Posted 2008-01-09 07:14 |
| 初级用户 Posts 22 Credits 48 | |
Originally posted by bush at 2008-1-9 01:13 AM: I remember that COPY can combine files of the same type together, and I've also combined files of different types. For example, if an image and a text file are combined, the command copy 01.jpg/b + 02.txt/a 03.jpg makes 03.JPG display exactly the same as 01.JPG in an image viewer, but if you open 03.JPG in TXT, what you see is a bunch of garbled text. But if you hold down CTRL+END, you can see the contents of 02.TXT. In other words, we can use the image in 03.JPG to hide our private information, right? (I learned this on the forum.) I can also hide information by combining a WMA file and a TXT file, so I was wondering: what would happen if two MP3 files were put together? I've now also tried copy 01.mp3/b + 02.mp3/b 03.mp3 and copy 01.mp3 + 02.mp3 03.mp3, and both gave the same result: they couldn't be played, and when I tried to delete them with DEL, it even said access denied. With WMA files I can still play one of the songs. But when I switch to MP3, not even one song will play? Why is that?? Can you tell me how you managed to try it successfully? Thank you!! If I combine two text files, 01.TXT and 02.TXT, I can see the information from both text files in one text file. But what kind of result do MP3 and WMA files give? I want to know, and I've tried it too. Hope someone can point me in the right direction!!! Is it that image + image can't be combined, and audio/video files can't be combined with audio/video files either? Can anyone make them play continuously? Hehe, I'm a newbie, don't laugh at me. [ Last edited by raysea007 on 2008-1-9 at 07:21 AM ] |
|
| Floor5 bush | Posted 2008-01-09 15:24 |
| 银牌会员 Posts 730 Credits 2,165 | |
|
This question involves the issue of file header formats. Plain text of course doesn't have any special format. Other audio, video, graphics, images, and formatted documents (such as WORD) are all stored in specific data formats. They all have specific markers at the file header position, for example: If you view a BMP format file with a hex editor, the first two numbers are 42 4D For ICO format, the first 3 numbers are 00 00 01 For mp3 format, the first one is always FF Application software identifies file formats this way. For example, if you change the extension of a bmp image file to .jpg and then open it with IrfanView, it will still automatically recognize that it's bmp format and help you change it back to the correct extension. After combining an image and text together, the software will still treat it as an image, but the plain text at the end obviously can't be processed according to the image data format, so that text is thrown away as corrupted data. That's why it won't be displayed. As for which formats can be combined, that depends on the specific case. In general image formats define width and height, so after combining them, the width and height data are still those of the original image, and only the first image will be displayed. Streaming media such as MPG and MP3 were defined rather simply at first. As long as there is data at the end of the file, it gets decoded and played; if the data is wrong, it gets discarded, so text can be merged onto the end. Multiple MP3s of the same type can be combined freely, of course on the premise that all parameters are the same (MP3s on the internet are generally 128kbps, 44100Hz, stereo). If MP3s with different bitrates and channels are combined together, decoding is definitely going to go wrong. A successfully combined MP3 will of course play continuously. Also, things like copying the upper and lower halves of a VCD together can also play continuously. |
|
| Floor6 bush | Posted 2008-01-09 15:44 |
| 银牌会员 Posts 730 Credits 2,165 | |
|
Let me give you another analogy:
There are three people standing in one row ***, and four people standing in another row **** Put them together and you get one row of seven people ******* That's what COPY can do. One square formation has 3*3=9 people *** *** *** Another square formation has 4*4=16 people **** **** **** **** If you combine them, what do you get? The answer is 5*5=25 people ***** ***** ***** ***** ***** Obviously, this is the result of recombining the two square formations, not of putting the second square next to the first. That kind of thing is what COPY cannot do (even though 9+16=25) |
|
| Floor7 raysea007 | Posted 2008-01-10 12:25 |
| 初级用户 Posts 22 Credits 48 | |
Originally posted by bush at 2008-1-9 03:24 PM: Thank you very much!!:P:P:P:P:P Now I understand. |
|
| Floor8 635635635 | Posted 2008-01-10 14:42 |
| 新手上路 Posts 10 Credits 19 | |
|
If mp3 files have the same bitrate, they can be combined, and you can listen to two songs continuously.
WMA files with the same encoding can also be combined, but you can only hear one song. For example, copy /b 1.wma+2.wma 3.wma only lets you hear 2.wma. |
|
| Floor9 raysea007 | Posted 2008-01-10 21:26 |
| 初级用户 Posts 22 Credits 48 | |
Originally posted by 635635635 at 2008-1-10 02:42 PM: How come what I hear is 1.wma? Why? That's strange. [ Last edited by raysea007 on 2008-1-10 at 10:04 PM ] |
|
| Floor10 hong555hong | Posted 2008-01-11 20:11 |
| 新手上路 Posts 7 Credits 13 | |
|
Experts from all sides, I'm just a newbie. Lately I've become downright obsessed with DOS, and I've run into the same problem here too. I used copy/b 1.rmvb+2.rmvb 3.rmvb to combine two files, and I still couldn't open it. When I played it with Baofeng Media, the screen was completely black. Even after reading the explanations above from the big brothers, I still don't understand. So is there any way to successfully combine two or more video files with copy????
|
|
| Floor11 raysea007 | Posted 2008-01-12 13:02 |
| 初级用户 Posts 22 Credits 48 | |
Originally posted by hong555hong at 2008-1-11 08:11 PM: Didn't post #5 and post #8 already say it? Files with the same bitrate can be combined, so the audio/video files we found must not have the same bitrate. I know the reason now, but I still haven't successfully combined them yet!:D:D:D:D:D |
|
| Floor12 sunkistwu | Posted 2008-01-13 12:12 |
| 初级用户 Posts 19 Credits 37 | |
Originally posted by raysea007 at 2008-1-12 01:02 PM: A bump, |
|
| Floor13 zyz0304360 | Posted 2008-01-13 18:35 |
| 中级用户 Posts 123 Credits 257 From 烟台 | |
|
Expert indeed
Big bump |
|
| Floor14 bbs4033 | Posted 2008-01-13 21:21 |
| 初级用户 Posts 10 Credits 22 | |
|
Learning
|
|
| Floor15 raysea007 | Posted 2008-01-14 11:11 |
| 初级用户 Posts 22 Credits 48 | |
|
We've only been focusing on the copy command. If there are only a few files, using the copy command is better. If there are many, then generally the xcopy command is used. But I thought of a question. Since audio/video files are relatively large, in theory it should be better to use the xcopy command when combining them, so I tried the xcopy command. But I found a problem, please advise!!!!!
C:\Documents and Settings\Administrator>xcopy 01.wma + 02.wma 03.wma Invalid number of parameters C:\Documents and Settings\Administrator>xcopy /b 01.wma + 02.wma 03.wma Invalid number of parameters I thought maybe it was because I was combining too few files, so I added a few more, but the result was still the same, C:\Documents and Settings\Administrator>xcopy/b 01.wma + 02.wma + 03.wma +04.wma +05.wma 06.wma Invalid number of parameters Who can explain? Thank you!!!!!!!!!!! [ Last edited by raysea007 on 2008-1-14 at 11:28 AM ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |