Skip to main content
Post Closed as "Opinion-based" by bmike

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using a FULL STOP . (period) maksemakes reverse conversion difficult as they will be misinterpreted as fractional seconds.

For example, when programming in Java 8 on OS X Mountain Lion, calling File::mkdir() for string 2014-12-11T21:33:08 results in a folder named 2014-12-11T21/33/08.

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using FULL STOP . (period) makse reverse conversion difficult as they will be misinterpreted as fractional seconds.

For example, when programming in Java 8 on OS X Mountain Lion, calling File::mkdir() for string 2014-12-11T21:33:08 results in a folder named 2014-12-11T21/33/08.

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, using a FULL STOP . (period) makes reverse conversion difficult as they will be misinterpreted as fractional seconds.

For example, when programming in Java 8 on OS X Mountain Lion, calling File::mkdir() for string 2014-12-11T21:33:08 results in a folder named 2014-12-11T21/33/08.

added 172 characters in body
Source Link
Basil Bourque
  • 13.4k
  • 40
  • 130
  • 205

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using FULL STOP . (period) makse reverse conversion difficult as they will be misinterpreted as fractional seconds.

For example, when programming in Java 8 on OS X Mountain Lion, calling File::mkdir() for string 2014-12-11T21:33:08 results in a folder named 2014-12-11T21/33/08.

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using FULL STOP . (period) makse reverse conversion difficult as they will be misinterpreted as fractional seconds.

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using FULL STOP . (period) makse reverse conversion difficult as they will be misinterpreted as fractional seconds.

For example, when programming in Java 8 on OS X Mountain Lion, calling File::mkdir() for string 2014-12-11T21:33:08 results in a folder named 2014-12-11T21/33/08.

Tweeted twitter.com/#!/askdifferent/status/543021891590840320
Source Link
Basil Bourque
  • 13.4k
  • 40
  • 130
  • 205

What characters might be used to substitute for colon in folder names using a time-of-day?

It is often convenient to name files and folders with a date and time, such as standard ISO 8601 format: 2014-12-10T22:35:28.460Z.

Unfortunately, the Mac’s HFS+ file system uses the COLON as a path separator just as Unix-like OSes use SOLIDUS / (slash) and Microsoft OSes use REVERSE SOLIDUS \ (backslash). All three characters must be avoided when naming a file or folder for compatibility.

What character might be commonly used as a replacement for the COLON?

  • Using a HYPHEN - makes it tricky to programmatically reverse the conversion to standard format.
  • Similarly, the using FULL STOP . (period) makse reverse conversion difficult as they will be misinterpreted as fractional seconds.