in reply to Short directory names...
A quick answer to your question might look something like this:
Although the following problems immediately become apparent:my $path = "C:\\Program Files\\Internet Explorer\\"; my @tokens = split(/\\/, $path); foreach(@tokens) { next unless length $_ > 8; s/\s//g; # remove whitespace $_ = substr($_, 0, 6) . '~1'; } $path = join("\\", @tokens);
I think that in order to answer your question better, we need to know what you're doing with the Win9x LFNs. If you don't need to do it on the fly, you're probably best off looking up the 8.3 directory name and entering it by hand. If you're running Perl in a Win9x environment, you should be able to use quotes when opening files and pipes to take advantage of Win9x's CLI. For example:
open(OUTFILE, ">\"C:\\Temp\\Jane's Addiction.CHOPRO\"");So tell us, what exactly are you trying to do? =)
|
|---|