File Name Format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anand

    #1

    File Name Format

    Greetings,

    How do I convert programmaticall y the file names from WIN32 to UNIX format?

    A code snippet would be of great help.
    We are new to python! :)

    Thanks.
    Best regards,
    Anand


  • Diez B. Roggisch

    #2
    Re: File Name Format

    Anand wrote:
    Greetings,
    >
    How do I convert programmaticall y the file names from WIN32 to UNIX
    format?
    >
    A code snippet would be of great help.
    We are new to python! :)
    unix_name = win_name.replac e("\\", "/")

    But this of course won't work for anything that starts with a drive letter
    for example.

    Diez

    Comment

    • Grant Edwards

      #3
      Re: File Name Format

      On 2007-05-08, Anand <anand.pasoria@ in.bosch.comwro te:
      How do I convert programmaticall y the file names from WIN32 to UNIX format?
      You don't need to. AFAIK, all legal WIN32 filenames are legal
      UNIX file names.
      A code snippet would be of great help.
      As would an example of what you're trying to do.

      --
      Grant Edwards grante Yow! JAPAN is a WONDERFUL
      at planet -- I wonder if we'll
      visi.com ever reach their level of
      COMPARATIVE SHOPPING ...

      Comment

      • Marc 'BlackJack' Rintsch

        #4
        Re: File Name Format

        In <134147e2gsg6v3 5@corp.supernew s.com>, Grant Edwards wrote:
        On 2007-05-08, Anand <anand.pasoria@ in.bosch.comwro te:
        >
        >How do I convert programmaticall y the file names from WIN32 to UNIX format?
        >
        You don't need to. AFAIK, all legal WIN32 filenames are legal
        UNIX file names.
        Doesn't this depend more on the file system than the operating system?

        Ciao,
        Marc 'BlackJack' Rintsch

        Comment

        • Grant Edwards

          #5
          Re: File Name Format

          On 2007-05-08, Marc 'BlackJack' Rintsch <bj_666@gmx.net wrote:
          In <134147e2gsg6v3 5@corp.supernew s.com>, Grant Edwards wrote:
          >
          >On 2007-05-08, Anand <anand.pasoria@ in.bosch.comwro te:
          >>
          >>How do I convert programmaticall y the file names from WIN32 to UNIX format?
          >>
          >You don't need to. AFAIK, all legal WIN32 filenames are legal
          >UNIX file names.
          >
          Doesn't this depend more on the file system than the operating system?
          Sort of. AFAIK, no matter which "Windows" filesystem you pick,
          the set of allowed filenames are legal for all of the common
          "Unix" filesystems (EXT3, XFS, Reiser, etc.).

          However, the OP hasn't offered any details about what it is
          he's actually wanting to do, so this is all just idle
          speculation...

          --
          Grant Edwards grante Yow! I know how to do
          at SPECIAL EFFECTS!!
          visi.com

          Comment

          Working...