Separator required, or not...

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
portal
Posts: 13
Joined: Wed Dec 12, 2012 2:45 am

Separator required, or not...

Post by portal »

TextPad

Last week I had reason to use an XP machine and realized that TextPad was opening files fine without a separator, whereas under Win7 this would generate 'invalid filename' and require a separator as d:\x.

TextPad is the only software I use that demands a separator on root filenames.

This behavior has been common across versions, 4.7, 5.4, and 6.5 on Win7 for me, so why the difference on XP?.

Is requiring the separator normal behavior or have I got a preference setting somewhere set the 'wrong' way?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Are you asking about the directory separator (\)?

D:\x and D:x mean different things:
D:\x means the subdirectory x of the root directory of drive D:
D:x means the subdirectory x of the current directory on drive D:

These two expressions refer to the same directory if and only if your current directory on D: happens to be the root directory,
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Check the settings in Configure - Preferences - General for
Allow Multiple files on command line

Are they the same?
portal
Posts: 13
Joined: Wed Dec 12, 2012 2:45 am

Separator required, or not...

Post by portal »

ben_josephs:

> D:\x and D:x mean different things:
> D:\x means the subdirectory x of the root directory of drive D:
> D:x means the subdirectory x of the current directory on drive D

Hardly, x is a filename, not a sub-directory.

MudGuard:

> Check the settings in Configure - Preferences - General for
> Allow Multiple files on command line

The settings were imported using the .reg export from XP as defined in "How to Transfer Preferences between PC's".

JIC, I confirmed it, all settings in General are the same.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

If x is a file then:

D:\x and D:x mean different things:
D:\x means the file x in the root directory of drive D:
D:x means the file x in the current directory on drive D:

These two expressions refer to the same file if and only if your current directory on D: happens to be the root directory.

By separator do you mean
  directory separator (\), as I understood it,
  command-line path separator (<space>), as MudGuard understood it, or
  something else?
Last edited by ben_josephs on Tue Apr 09, 2019 4:13 pm, edited 1 time in total.
portal
Posts: 13
Joined: Wed Dec 12, 2012 2:45 am

Separator required, or not...

Post by portal »

Thanks for helping me realize I had not made it explicit that d: is sitting at d:\ and that I was talking about directory separators.

In such a case the addresses of d:x and d:\x are synonyms.

My use of D: is as a scratchpad. It is the only partition without sub-directories, so is the only one where separators are not required to locate a file.

- XP TextPad is happy with both d:x and d:\x
- W7 TextPad is only happy with d:\x

My work on the XP machine was using Word 2003 and TextPad to re-organize a large number of documents being re-structured for updating and re-issue.

It is hardly a significant problem, but I am puzzled as to why TextPad's behavior was different.
User avatar
AmigoJack
Posts: 532
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Re: Separator required, or not...

Post by AmigoJack »

portal wrote:TextPad is the only software I use that demands a separator on root filenames.
Does that mean a different software (i.e. Notepad or Notepad++ or whatnot) allow you doing the same thing in Win7 that works for you in WinXP?
portal wrote:My use of D: is as a scratchpad. It is the only partition without sub-directories, so is the only one where separators are not required to locate a file.
D: is not a partition, it's a volume. Not providing an absolute path (but instead only a relative one as you do) is in fact undefined.
portal wrote: - XP TextPad is happy with both d:x and d:\x
- W7 TextPad is only happy with d:\x
Please assure that this is not the behaviour when using a different software (not only Word) right after you booted your computer. Does it also happen with TextPad even after you used it with File > Open > D:\?

You describe something that I never would have dared to do myself: using a relative path without ever using an absolute before. As ben wrote before: those are different things, unrelated to if you have folders or not.
portal
Posts: 13
Joined: Wed Dec 12, 2012 2:45 am

Separator required, or not...

Post by portal »

> Does that mean a different software (i.e. Notepad or Notepad++ or whatnot)
> allow you doing the same thing in Win7 that works for you in WinXP?

I went back to the XP system to run a comparison.

XP behavior, on AltF/Open, type d:x
..At d:, D:\ appears below
..At d:x, software will open the file named x

W7 behavior, on AltF/Open, type d:x
..At d:, nothing appears
..At d:x, software will respond 'The filename is not valid'

CMD behavior is variable

..textpad e:z --> opens z
..textpad e:\temp\y --> opens y
..textpad e:w --> opens w

The following sequence has different results
..textpad e:\temp\y --> opens y
..textpad e:z --> 'OK to create e:\d-temp\z?'
..textpad e:\z --> opens z
..textpad e:w --> 'OK to create e:\d-temp\w?'

TextPad remembers first usage of a volume, and other software can do things differently

I use PDF Xchange to view PDFs
..PDFX e:\temp\y --> opens y
..PDFX e:z --> opens z

PDFX always uses \ as the implicit directory if there is no separator

Observation:

- The difference in opening a file is a Microsoft change in behavior between the operating systems. XP volunteers the root as an implicit path. Win7 is pedantic and requires the user to supply the root separator.

- CMD line behavior is application dependent, absence of a separator may mean root directory, first-opened directory, or current directory.

Thanks for the assist.
User avatar
AmigoJack
Posts: 532
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

I wanted to know what happens right after using your computer for the first time after it has booted - any attempts after the initial one would already have accessed a path on volume D: and thus not help.

Or in other words: when either using the "Save" dialog or when using CMD first enter in both cases D:\ (literally: in both cases also hit the RETURN key). Then everything should also work as you want it: you're free to type D:x to use that filename (doesn't matter if Save dialog or CMD) and every software should accept it.
portal
Posts: 13
Joined: Wed Dec 12, 2012 2:45 am

Separator required, or not...

Post by portal »

> you're free to type D:x

d:x is rejected every time, whether it be immediately after boot or not.

After TextPad is invoked, the behavior is always the same:

AltF/Open
.. d:\x --> d:\x
.. e:\temp\y --> e:\temp\y
.. z --> d:\z
.. d:z --> 'The filename is not valid'
.. d:\z --> d:\z will open

TextPad will open files anywhere with separators
TextPad will open files in the first directory accessed if there is no prefix
TextPad will flag every volume and filename combination without a separator
Post Reply