Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Underscores in File Names

Reply
Thread Tools

Underscores in File Names

 
 
Allistar
Guest
Posts: n/a
 
      07-04-2007
Bruce Sinclair wrote:

> In article <f6eg7f$vc0$>, Gib Bogle
> <> wrote:
>>Michael wrote:
>>> Recently I have noticed that I am getting underscores inserted in the
>>> spaces of file names when saving pictures from Outlook Express 6 and
>>> also from IE7. That is when I right click a picture in the preview pane
>>> in OE or from a web page in IE7 and choose "Save Picture As" from the
>>> drop down menu, underscores are automatically being inserted in the
>>> spaces of the file name. It does this when the original file did not
>>> have underscores. eg. My Holiday Picture.jpg becomes
>>> My_Holiday_Picture.jpg. It does not do this in OE if you use the "Save
>>> Attachments" command where it saves the attachment with the correct name
>>> without the underscores.
>>>
>>> Does anyone know how to stop it inserting those pesky underscores in the
>>> file names?

>>
>>I'm more concerned about those pesky spaces in file names.

>
>
>
> All i can suggest to Michael (as you could have ) is that his pictures
> are being downloaded from sites running on linux or unix and that OE is
> not handling the file names correctly in some cases. Spaces are not
> allowed in filenames on those systems.


Nonsense. Spaces are as valid a character as any other in Linux.

> A question that comes to mind though is ... why are the underscores a
> problem ?


Allistar.
 
Reply With Quote
 
 
 
 
Allistar
Guest
Posts: n/a
 
      07-04-2007
Lawrence D'Oliveiro wrote:

> In message <f6ergk$chb$>, Bruce Sinclair wrote:
>
>> All i can suggest to Michael (as you could have ) is that his pictures
>> are being downloaded from sites running on linux or unix and that OE is
>> not handling the file names correctly in some cases. Spaces are not
>> allowed in filenames on those systems.

>
> *nix filenames can have any characters except "/" and nul.


Yes, even Cr or Lf are valid characters in file names. Not sure why you'd
want to, but they're valid none-the-less.

Allistar.
 
Reply With Quote
 
 
 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      07-04-2007
In message <2aCdnROKL->, Allistar wrote:

> Lawrence D'Oliveiro wrote:
>
>> *nix filenames can have any characters except "/" and nul.

>
> Yes, even Cr or Lf are valid characters in file names. Not sure why you'd
> want to, but they're valid none-the-less.


And properly-written scripts, in particular, have to deal with this.

--
Lawrence "Been There, Done That" D'Oliveiro
 
Reply With Quote
 
Allistar
Guest
Posts: n/a
 
      07-04-2007
Lawrence D'Oliveiro wrote:

> In message <2aCdnROKL->, Allistar
> wrote:
>
>> Lawrence D'Oliveiro wrote:
>>
>>> *nix filenames can have any characters except "/" and nul.

>>
>> Yes, even Cr or Lf are valid characters in file names. Not sure why you'd
>> want to, but they're valid none-the-less.

>
> And properly-written scripts, in particular, have to deal with this.


Yes. I've always had difficulty with file names that start with a "-"
character. Getting scripts to work with them can be tricky.

Allistar.
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      07-04-2007
In message <>, Allistar wrote:

> ... I've always had difficulty with file names that start with a "-"
> character. Getting scripts to work with them can be tricky.


That's an easy one to solve, e.g.

for f in *; do file ./$f; done

 
Reply With Quote
 
impossible
Guest
Posts: n/a
 
      07-04-2007

"Michael" <> wrote in message
news:468b502a$...
>>

> Thank you for your reply but the above does not really answer the question
> I asked. It deals with folder names.
> I also did search Google and Microsoft with no obvious answer before I
> resorted to asking this group.I thought it may be something simple that I
> was missing but obviously not. I have also taken Windows back before the
> latest XP updates but that has not fixed the problem either.
> I have had no trouble using spaces in file names (up until now) and most
> of the files I am saving are .jpg. And no, they are not porno pictures,
> they are auto, aircraft and other related vehicle pictures as I am an
> Auto/Aircraft historian. I have several gigs of archives.
> My problem is that pictures which are sent to me by email or posted to
> newsgroups etc are usually done so with blank spaces in the file names.
> When I download them and use the "Save Picture As" function, OE/IE7 is
> putting underscores in the spaces. This causes problems with doubling up
> in my archive folders and wastes hours of time.
>
> If anyone does know why Windows would suddenly start inserting the
> underscores and how to stop it happening I would be indebted.
>


Nathan may be able to shed some light on this issue -- it's been the topic
of some discussion in various MS forums. I don't know anything about OE,
because I never save anything from there. But as I understand it, changes
were made in the IE7 caching mechanism to insert underscores in place of
spaces in all filenames, and there is no switch to override this behavior.
Whether that should be considered a good or bad design change, I can't
say -- but I can certainly see the problem it creates for your archive
collection.

Assuming you plan to continue using OE and IE7 for your downloads, the best
solution I can think of is to grab one of the many file rename utilities out
there that will let you create a script to replace spaces with underscores
in all your existing filenames -- that will avoid future duplication
headaches.


 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      07-04-2007

"impossible" <> wrote in message
news:. ..
>
> "Michael" <> wrote in message
> news:468b502a$...
>>>

>> If anyone does know why Windows would suddenly start inserting the
>> underscores and how to stop it happening I would be indebted.
>>

>
> Nathan may be able to shed some light on this issue -- it's been the topic
> of some discussion in various MS forums. I don't know anything about OE,
> because I never save anything from there. But as I understand it, changes
> were made in the IE7 caching mechanism to insert underscores in place of
> spaces in all filenames, and there is no switch to override this behavior.
> Whether that should be considered a good or bad design change, I can't
> say -- but I can certainly see the problem it creates for your archive
> collection.
>
> Assuming you plan to continue using OE and IE7 for your downloads, the
> best solution I can think of is to grab one of the many file rename
> utilities out there that will let you create a script to replace spaces
> with underscores in all your existing filenames -- that will avoid future
> duplication headaches.
>

Thanks for your helpful post and the info. Looks like I may have to just
lump it and do some sort of work around. Damn updates LOL. And yep, I
already have a file renaming utility.

Michael





 
Reply With Quote
 
jack
Guest
Posts: n/a
 
      07-04-2007
On Thu, 5 Jul 2007 04:51:44 +1200, "Michael" <> wrote:

>
>"impossible" <> wrote in message
>news: ...
>>
>> "Michael" <> wrote in message
>> news:468b502a$...
>>>>
>>> If anyone does know why Windows would suddenly start inserting the
>>> underscores and how to stop it happening I would be indebted.
>>>

>>
>> Nathan may be able to shed some light on this issue -- it's been the topic
>> of some discussion in various MS forums. I don't know anything about OE,
>> because I never save anything from there. But as I understand it, changes
>> were made in the IE7 caching mechanism to insert underscores in place of
>> spaces in all filenames, and there is no switch to override this behavior.
>> Whether that should be considered a good or bad design change, I can't
>> say -- but I can certainly see the problem it creates for your archive
>> collection.
>>
>> Assuming you plan to continue using OE and IE7 for your downloads, the
>> best solution I can think of is to grab one of the many file rename
>> utilities out there that will let you create a script to replace spaces
>> with underscores in all your existing filenames -- that will avoid future
>> duplication headaches.
>>

>Thanks for your helpful post and the info. Looks like I may have to just
>lump it and do some sort of work around. Damn updates LOL. And yep, I
>already have a file renaming utility.
>
>Michael
>
>
>
>




Yes but never ever use IE7 its total CRAP takes all day to load bookmarks and can't sort them when
adding new ones..

So why not try Firefox instead..??




 
Reply With Quote
 
Shane
Guest
Posts: n/a
 
      07-04-2007
Lawrence D'Oliveiro wrote:

> In message <>, Allistar
> wrote:
>
>> ... I've always had difficulty with file names that start with a "-"
>> character. Getting scripts to work with them can be tricky.

>
> That's an easy one to solve, e.g.
>
> for f in *; do file ./$f; done


He's trying to catch switches as well
eg grep -i -myfile
(-myfile being the file being grepped, -i being the case insensitive switch)

--
It is only two weeks into the term that, in a calculus class, a student
raises his hand and asks: "Will we ever need this stuff in real life?"
The professor gently smiles at him and says: "Of course not - if your real
life will consist of flipping hamburgers at MacDonald's!"

 
Reply With Quote
 
Bruce Sinclair
Guest
Posts: n/a
 
      07-04-2007
In article <468b5822$>, "Michael" <> wrote:
(snip)

>> A question that comes to mind though is ... why are the underscores a
>> problem ?


>Yes I realise that web sites will quite often, even usually have underscores
>in the file names. That is not particularly the problem. My problem is that
>recently Windows/OE/IE7 has taken to putting the underscores in (when they
>weren't in the original file name) when I save the pictures using the "Save
>Picture As" command from the menu.
>I am an Auto/Aircraft historian and have several gigs of archived pictures
>for research etc. For various reasons I try to save the pictures with their
>original file names. When Win inserts underscores in the filenames it means
>that it is easy to double up on archives. This can waste hours of time
>searching the files and cleaning them out again.


Yep ... that's an excellent reason.

>I have searched Google/Microsoft and used XP's restore function and gone
>back past the last XP updates but that has not fixed the problem either.
>
>If anyone knows why Windows should start putting in the underscores when it
>never used to and how to stop it doing so I would be very grateful.


I would suggest that a default has changed ... but apart from that, can't
offer any idea as to which one it might be - sorry. Have you changed your OS
or the versions of the s/w about the time it started doing this ? There
might be something in the "differences from previous versions" files.
I am in the process of standardising on underscores everywhere ... so if you
discover how to change your settings, can you please let me know so I can
swap mine the other way ? It would be greatly appreciated.

As an aside, remember that "folders" are just directories are just files,
like any other.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New coding standards: use underscores, hyphens or mixed case in command (and identifier) names James Harris C Programming 46 07-23-2004 03:25 PM
Using underscores as well as word boundaries to demarcate a pattern Laura Perl 1 06-03-2004 05:25 PM
Javascript Function with Underscores!? J. Hall HTML 4 06-03-2004 08:23 AM
underscores in class member names BRIAN VICKERY C++ 22 02-01-2004 12:18 PM
Opinions about underscores in names Kari Laitinen C++ 2 11-13-2003 04:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57