Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

any DOS gurus?

Thread Tools
 
Search this Thread
 
Old 09 November 2009, 01:56 PM
  #1  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default any DOS gurus?

If I have 2 files and i want to concatenate them into a new file, how do I do that?

so...
check file 1 exists
if not error
check file 2 exists
if not error
join file1 and file2 into [new] file3

Old 09 November 2009, 02:06 PM
  #2  
Dedrater
Scooby Regular
 
Dedrater's Avatar
 
Join Date: May 2008
Posts: 3,957
Likes: 0
Received 0 Likes on 0 Posts
Default

To copy and concatenate the files scooby1.DOC and scooby2.DOC to a new file, scooby3, you would enter

copy C:\scooby1.doc+C:\scooby2.doc C:\scooby3

I think
Old 09 November 2009, 02:09 PM
  #3  
Iain Young
Scooby Regular
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Default

or...

type file1 > newfile
type file2 >> newfile

I presume these are just plain old standard text files?
Old 09 November 2009, 02:11 PM
  #4  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

hard coded works

but this doesn't...

copy %hdr%+%trlr% %fn%

I get 'syntax of the command is incorrect'
Old 09 November 2009, 03:47 PM
  #5  
LostUser
Scooby Regular
 
LostUser's Avatar
 
Join Date: Oct 2005
Posts: 476
Likes: 0
Received 0 Likes on 0 Posts
Default

Works OK for me.

To test I created a.txt and b.txt,

then,

set filea=a.txt
set fileb=b.txt
set filec=c.txt

copy %filea%+%fileb% %filec%

That ran fine.
Old 09 November 2009, 04:20 PM
  #6  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

okay, that worked for me too !

damn quotes.

thanks all
Old 09 November 2009, 04:21 PM
  #7  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

...now if i could only get snow leopard to install...
Old 09 November 2009, 06:20 PM
  #8  
tarmac terror
Scooby Regular
iTrader: (2)
 
tarmac terror's Avatar
 
Join Date: May 2005
Location: Northern Ireland
Posts: 2,498
Received 0 Likes on 0 Posts
Default

Seems to be very hardware specific - assume you are trying on a PC???

If you do it please post some instructions.
Old 09 November 2009, 06:57 PM
  #9  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

what motherboard do you have TT?

if it's a gigabyte, then SL is pretty simple. otherwise a little more clumsy.

Mine's abit ....but I am happily running 10.5.8
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Darrell@Scoobyworx
Trader Announcements
26
30 January 2024 01:27 PM
blackieblob
ScoobyNet General
4
01 October 2015 11:37 AM
alcazar
Non Scooby Related
37
27 September 2015 10:35 PM
StueyBII
General Technical
4
26 September 2015 12:35 PM



Quick Reply: any DOS gurus?



All times are GMT +1. The time now is 12:54 PM.