LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2011, 11:11 PM   #1
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
ext3 to fat32 usb drive filename character(s) problem


I am using Debian Lenny 5.0.3 with a stock 2.6.26-2-amd64 kernel, and have a ~/Documents/HTMLS directory of 273.2MB (21590 files, 1063 sub-folders) which according to konqueror shows 1130 items - 572 files (60.8MB Total) - 558 folders, these were created by 'Save Page As' in Iceweasel 3.5.11.

I am trying to copy the contents of this directory to a similar directory on a 2GB USB thumbdrive /dev/sdb1 which was partitioned and formatted as fat32 by Qparted.

Problem is that the copying ceases after about 6 files transfer. I found that (as I am sure you know) the named.html files come with a matching named_files folder, and often there are what appear to be invalid characters such as '*','?',and ':' in the filenames in said named_files folders.

After exhaustive googling [I know we all say that] I found an instruction:

Code:
pax -rw -s '/[*?:]/_/gp' stuff /fat32/partition
that changes the name of the files, replacing said characters with '_', but whilst I can get pax from my repos, I really don't want to 'archive' the files - since I understand that pax was created to bridge a war between tar and cpio - because I want to be able to read the html files on an old (not connected to the Internet) WinXP tablet.

Sooo, I believe that I need to create a script, that scans all the filenames, greps and seds to replace said 'unacceptable' characters. I am assuming that Firefox on the Tablet PC will be able to open the htmls if I can get them onto the thumb drive.

Thanks in advance for any hints or tips that you can provide, As you have no doubt appreciated I ain't no programmer nor script kiddie!

Edit: Are there any other known characters in filenames that M$ file systems can't handle?

Last edited by minrich; 02-13-2011 at 11:21 PM. Reason: New thought
 
Old 02-14-2011, 09:58 AM   #2
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Not sure if it will work, but you could try formatting the USB drive to ext2/3 and use ext2fsd on Windows to read the drive. The question is will Windows accept the "special" characters on the drive.

Edit: I think Windows doesn't like / and \ either. And under some conditions everything that is not in the local codepage (problems possible under DOS and with applications using old MS API)

Last edited by hansalfredche; 02-14-2011 at 10:02 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB writing problem with external drive (ext3) ghost333 Linux - Hardware 3 10-05-2009 11:38 AM
How to Format a NTFS (USB) Hard Drive to FAT32 (or Ext3)? tomihasa Linux - Newbie 4 06-14-2009 05:29 AM
problem with Asian character filename in Redhat ufmale Linux - Newbie 1 01-16-2008 04:30 AM
USB external drive: NTFS/FAT32 detected, ext3 not blanks77 Linux - Hardware 7 04-25-2006 08:45 PM
Character encoding problem for filename in ubuntu xenthos Linux - General 1 03-22-2006 12:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration