Royal Bank of Scotland has been given less than three weeks to hand over emails and other correspondence sent by former chief executive Fred Goodwin and former head of investment banking, Johnny Cameron, in the prelude to its October 2008 collapse.

In a hearing in the Royal Courts of Justice earlier this month, the Hon. Mr Justice Robert Hildyard, ordered the state-rescued bank and its lawyers Herbert Smith Freehills to produce evidence, including executive directors' correspondence, emails and phone call transcripts.

The judge made his ruling in the build-up to a £4 billion investor-led court case, in which RBS stands accused of misleading investors into pumping in £12.3bn in a rights issue, up till then the UK's largest ever corporate capital-raising.

In a prospectus published on 30 April 2008, RBS is alleged to have given the impression that if investors subscribed to a £12.3bn rights issue, its capital problems would be solved and it would have sufficient working capital to survive for at least 12 months. However the bank collapsed, requiring a £45.5bn taxpayer-funded bailout, four months after the money was raised. Investors, including thousands of employees of RBS, NatWest and Ulster Bank, lost more than 95 per cent of their cash.

The judge has ordered the bank to hand over the correspondence to the claimants and their legal teams, or, in some instances explain why it has been unable to provide the evidence, in a series of stages starting on April 1 and culminating on 17 April 2015, with a final deadline of 15 June 2015.

Hildyard has laid out a new timetable to which the bank and Herbert Smith Freehills are expected to adhere. The formal trial itself is not scheduled to start until 2016.

During the hearing Hildyard also dismissed RBS's legal team's repeated demand that the shareholder group draft a "model prospectus", understood to be a document that would show what they believe ought to have been in the rights issue prospectus. He called the demand a "distraction".

He said: "It would be a great, great distraction if the issue which is the sufficiency of this prospectus were clouded by a debate about another prospectus... I think we have got quite enough on our hands trying to find out what the position is with respect to this [the actual, published] prospectus."

The long list of data the bank has been asked to hand over includes emails sent by Johnny Cameron. Claimants believe these may be critical to their case.

These and emails sent and received by the then Sir Fred Goodwin, who was forced out as RBS chief executive on 13 October 2008, and later had his knighthood rescinded, must be handed over by 1 April, said Hildyard.

RBS was also instructed to seek to obtain emails sent and received by advisers on the rights issue, including Merrill Lynch, Goldman Sachs and UBS, as well as correspondence sent by the team it installed to run ABN AMRO after RBS acquired it in October 2007.

The judge also gave RBS until 17 April to detail all the "shared [computer] drives" it was operating in the UK on 30 June 2008, and to outline the ease with which these could be trawled for data.

While Goodwin did not have a personal RBS email account, the claimants are seeking sight of those sent from the RBS account of personal assistant Mary McCallum, as well as those Goodwin is believed to have sent from the accounts of other members of his secretarial team. Private emails sent by former RBS finance director Guy Whittaker are also being sought.

One of the four investor groups that is suing RBS - the RBoS Shareholder Action Group - has named Goodwin, Cameron, Whittaker and former RBS chairman Sir Tom McKillop, as defendants in its lawsuit alongside the bank.

These four ex-directors will now be obliged by Wednesday to complete "Electronic Documents Questionnaires", providing full details of all personal email accounts, mobile phones and computers they were using between March 2007 and February 2009.

The bank was also ordered to seek to retrieve emails sent and received by its former non-executive directors. These include the former Treasury mandarin Sir Steve Robson, former EU commissioner Peter Sutherland, and the ex-senior partner of KPMG Scotland, Archie Hunter. Hildyard gave the bank until 17 April to summarise its progress in retrieving sent and received messages.

RBS press office declined to comment on the judge's rulings, the bank has earlier said:

"While RBS and its former directors made some business decisions that have been criticised, this does not mean that they misled investors or acted illegally."

"We believe we have strong defences to the claims that are being brought against the Group and that is why we intend to defend these vigorously and to protect the interests of our shareholders including UK taxpayers."