Success at last!
First thing – huge thanks to chrestomanci – whose advice yesterday and today combined to let me sort out the problem file names on the ext2-formatted USB hard disk I have been using with the Evesham iplayer.
I've been using this large-capacity drive as a temporary storage place for programmes recorded on the iplayer and also as a way of conveniently copying lots of these programmes onto other hard disks within my main test PC – some for editing and turning into DVDs, other for playing back by the iplayer over Ethernet - something that requires the PC to be running Windows Media Connect.
++++++++++++++
So, this was what I had to do to successfully change the Windows-illegal file names of two files on an ext2-formatted USB hard disk, each illegal because it included a question mark.
These illegal names were going to remain a major problem because, all the while a file has an illegal name, under Windows, it:
* Can't be played
* Can't be copied
* Can't be moved
* Can't be renamed
* Can't be erased (short of formatting the entire disk)
The question mark that made each file name illegal was actually part of the name of a programme the iplayer had saved to its own hard disk and I had exported via USB to the ext2-formatted hard disk.
So two biggish recordings were sitting there taking up hard disk space and doing nothing useful - and there was nothing I was able to do about that situation under Windows.
The file names, not incidentally, were:
Sat 20 Jan 18.00-19.00 - BBC FOUR - Are We Changing Planet Earth? .mp2
and
Sat 20 Jan 19.00-20.00 - BBC FOUR - Can We Save Planet Earth?.mp2
The problem was fixed using the Knoppix 5.01 self-running (CD-based) version of Linux, which can be downloaded here - actually, the version of the LiveCD that's now available is V5.1.0.
The first step - having downloaded an iso image of the Knoppix operating system and burnt that to CD using the Disc Copier app in Roxio's Media Creator 9 suite - was to change the PC's Bios settings so the computer boots first from a CD, rather than a hard disk.
With Knoppix running, I plugged in the USB hard disk – which the OS recognised and mounted as sdc1 – fired up a terminal window and logged on as the root user by issuing this command,
sudo su –
The USB drive was automatically mounted in a read-only state, so I forced the drive to be remounted using the following command.
mount /dev/sdc1 -o rw,remount
Next, I switched to the USB drive within terminal by issuing this command,
cd /media/sdc1
I'd realise the previous day that I needed the names of the two files in Linux-friendly versions to be able to change them – that is in a form that that took account of the spaces in the names - and that I could get these by doing a directory listing of the disk, so typed this command,
dir
The drive's entire contents were listed but that listing including the names of the two problem files, which were shown as:
Sat\ 20\ Jan\ 18.00-19.00\ -\ BBC\ FOUR\ -\ Are\ We\ Changing\ Planet\ Earth?\ .mp2
and
Sat\ 20\ Jan\ 19.00-20.00\ -\ BBC\ FOUR\ -\ Can\ We\ Save\ Planet\ Earth?.mp2
I then renamed them one at a time, using the mv command.
Terminal let's you copy from its window previous commands and responses issued in that session, so I saved time – and guaranteed accuracy - by copying the file names from higher up the window and pasting them in at the command prompt. I did the same for the new file names by pasting the old file names into a text editor, editing them to what I wanted and copying the new versions from the editor to the command prompt line.
The command issued to change the first file name - taking the form mv oldname newname - and all input on one line) was,
mv Sat_20_Jan_18.00-19.00_BBC4_Are_We_Changing_Planet_Earth.mp2 Sat\ 20\ Jan\ 18.00-19.00\ -\ BBC\ FOUR\ -\ Are\ We\ Changing\ Planet\ Earth?\ .mp2
And, the command to change the second was,
mv Sat\ 20\ Jan\ 19.00-20.00\ -\ BBC\ FOUR\ -\ Can\ We\ Save\ Planet\ Earth?.mp2 Sat20_Jan19_00-20_00_BBC4_CanWeSavePlanetEarth.mp2
And that, essentially was that!
One oddity, though.
I'd wanted to copy the entire terminal session and save it as a text file – the better to write this posting and to have a full record for the iplayer review – but found that, unlike yesterday, a USB stick drive connected to the PC under Knoppix was write-protected.
So, I ended up going online within Knoppix and pasting the contents of the terminal session into this posting – later coming along and tidying it up within Windows.
However, I suspect that, yesterday, I may have forced the stick drive to be writeable by all users – from within its property options available by a right-click - something that was not possible with the USB hard drive and thus prevented me from using chmod command to make the two file names editable.
For the record, the specific command line used to try to do that was,
chmod 0666 filename
Once again, huge thanks to chrestomanci for keeping on keeping on!