ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: Hans Hagen via ntg-context <ntg-context@ntg.nl>
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: Re: escape io.fileseparator in Windows
Date: Thu, 4 Nov 2021 15:54:43 +0100	[thread overview]
Message-ID: <2e3d1b2a-70c5-b33e-ff6e-e5b9d2496a9d@gmx.es> (raw)
In-Reply-To: <039e6543-7ef0-33c0-7b96-f04973a9faca@xs4all.nl>

On 11/3/21 9:55 PM, Hans Hagen via ntg-context wrote:
> On 11/3/2021 7:49 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How can I get the io.fileseparator or escape the backslash in
>> main_filename_win above?
> (there are helpers for splitting names and combining paths)
>
> - use locals
> - wrap names in "" and use / : dir "c:/data"

Many thanks for your reply, Hans.

I didn’t know that this was valid in Windows command prompt:

  command "d:/data/file.txt"

> - just use file.copy (with forward slashes), is faster too

copy was just a command sample, not the one I intend to use.

> so in the end there is no need to test for windows

I’m really suprised that Windows accepts slashes in paths.

Many thanks for your help again,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-11-04 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 18:49 Pablo Rodriguez via ntg-context
2021-11-03 20:55 ` Hans Hagen via ntg-context
2021-11-04 14:54   ` Pablo Rodriguez via ntg-context [this message]
2021-11-04 19:56     ` Henning Hraban Ramm via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e3d1b2a-70c5-b33e-ff6e-e5b9d2496a9d@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).