Dealing With Filenames Containing Slash Character

Jun 2, 2008
376
2
Newton, MA
Someone sent me a CDROM (made on a Mac) with file and directory names
containing a date string with forward slashes. No matter what I have
tried, TCC always changes the forward slashes to backward slashes and
then reports that it cannot find the file. Is there a way to overcome
this problem?

-- Jay
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
Someone sent me a CDROM (made on a Mac) with file and directory names
containing a date string with forward slashes. No matter what I have
tried, TCC always changes the forward slashes to backward slashes and
then reports that it cannot find the file. Is there a way to overcome
this problem?

-- Jay

Forward and backward slashes are both treated as path separators by Windows.
 
Jun 2, 2008
376
2
Newton, MA
So you're saying that nothing can be done.

If this were a writable disk, I would go in with a disk editor and
change the file names, but that won't work with a CDROM. So I guess I'll
just have to get the person to burn a new CD and send it to me again.

Thanks.

-- Jay
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Jay Sage wrote:
| So you're saying that nothing can be done.
|
| If this were a writable disk, I would go in with a disk editor and
| change the file names, but that won't work with a CDROM. So I guess
| I'll just have to get the person to burn a new CD and send it to me
| again.

I can think of one thing you could try. Use dir/b/s to create a file
containing all the filenames on the CDROM, and edit each name in the file to
be quoted, possibly convert each line to a separate COPY command (to a local
drive), and execute that. The command below MIGHT do what you need (not
tested!)

*dir/b/s z: | ( for %f in (@con:) echo copy "%f"
%@replace[v:,c:\temp,%@replace[/,\,%f]]" ) > fixup.btm
--
Steve
 
Jun 2, 2008
376
2
Newton, MA
Steve Fabian wrote:

> Use dir/b/s to create a file containing all the
> filenames on the CDROM

I have no trouble getting the file names using DIR, but no COPY command
can process the file. Even inside quotes and even when preceded by the
escape character, the slash is interpreted as part of a path
specification, so the file is never found.

As I wrote before, if I were dealing with a floppy disk or memory stick,
I could go in with a disk editor and change the file name, but that
won't work with a CDROM.

In the meantime, the person who sent the CD was able to email the
inaccessible files to me.

I'm surprised that a Mac, which uses Unix as its underlying operating
system, supports file names with slashes.

-- Jay
 

samintz

Scott Mintz
May 20, 2008
1,501
16
Solon, OH, USA
OHH! But NOW I see.... Doh!

The filename uses illegal characters and therefore cannot be copied.

Since you appear to be comfortable with using disk editing tools, Why
don't you create an ISO image of the CD and then edit the image. You can
then mount the ISO image to get at the files using Daemon Tools or
something similar.

ISO Recorder from Alex Feinman will allow you to create an ISO image:
http://isorecorder.alexfeinman.com/isorecorder.htm

Daemon Tools is available from http://www.daemon-tools.cc/downloads

XVI32 is a free hex editor that will allow you to edit the ISO file:
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

-Scott

Jay Sage <> wrote on 03/11/2009 03:26:58 PM:


> Steve Fabian wrote:
>
> > Use dir/b/s to create a file containing all the
> > filenames on the CDROM
>
> I have no trouble getting the file names using DIR, but no COPY command
> can process the file. Even inside quotes and even when preceded by the
> escape character, the slash is interpreted as part of a path
> specification, so the file is never found.
>
> As I wrote before, if I were dealing with a floppy disk or memory stick,


> I could go in with a disk editor and change the file name, but that
> won't work with a CDROM.
>
> In the meantime, the person who sent the CD was able to email the
> inaccessible files to me.
>
> I'm surprised that a Mac, which uses Unix as its underlying operating
> system, supports file names with slashes.
>
> -- Jay
>
>
>
>
 
Similar threads
Thread starter Title Forum Replies Date
D How to? Dealing with untrusted certificates Support 2
W Bugs in dealing with Chinese characters? Support 0
Phileosophos PDIR to list filenames without extensions? Support 2
D How to? Filenames with "&" character Support 3
fpefpe How to? processing filenames Support 6
C Filenames with ";" Support 13
E Fixed DEDUPE doesn't handle filenames with whitespace properly when symlinking Support 1
mikea How to? Problem with @SFN (short filenames) Support 6
A CDD and DOS filenames Support 1
A How to? Work with Filenames Containing Brackets "[" and "]" Support 2
C How to? Replace &'s in filenames / FixNames.dll Support 2
BobK How to? Handling filenames with blanks at command line Support 3
J Fixed Filename completion does not quote filenames containing ^ Support 1
T Square brackets in filenames Support 1
JohnQSmith Filenames with semicolons Support 5
P Support for national letters in filenames in ftp operations Support 1
N Problems with backquotes in filenames Support 17
S Suggestion: enhanced automatic quoting of filenames Support 2
S PDIR has trouble processing filenames with embedded percent sign Support 3
C handling percent signs in filenames Support 2
C handling percent signs in filenames Support 1
B Problems with %-sign in filenames/directory names Support 6
A Color in filenames in listview Support 1
greyfairer TCC Quotes needed for Arguments containing '='? Support 11
M How to? Parsing lines containing double quotes... Support 3
nickles How to? Enumerate files containing '%' Support 2
D Function containing iff doesn't work in build 48 Support 11
E Batchparameter containing equal sign Support 9

Similar threads