ZTree.com  | ZEN  | About...  

 Index   Back

[Wish] Add the 'Space character' to the ZTree Filter characters   [Wish]

By: Bill Kingsbury       
Date: Jun 27,2014 at 19:55

I believe there are many reasons to add the 'Space' character (or a suitable alias) to ZTree's allowable Filter characters -- considering that I encounter the need for this almost daily. And the following "new" reason, adds another whole category to the possible applications.


_____ Windows Errors due to Directory names with 'end spaces' _____

I attempted to use ZTree to extract a zipped PDF file into its "parent directory" (one level above it), but Windows objected, and ZTree displayed an "Error: [124]".

In another test-attempt to extract a zipped PDF file into its parent directory, ZTree responded with: "Directory does not exist. Make a new path?" (...How can a parent directory not exist, if the sub-directory does exist?)

As a test, I attempted to copy a different file into that same directory, but that produced the same response: "Directory does not exist. Make a new path?"

Using ZTree to delete a file in another test directory also failed, resulting in another "Error: [124]".

(Note: - Windows Explorer also failed where I tried it, and running CHKDSK found no problems.)
...

By trial-and-error, I discovered that Windows "Error Code 124" can be caused by an invisible "space at the end" of a directory name.

However, adding a space to the end of a Windows Directory name can't be done directly, using a keyboard... (like it can with File names, where end-spaces seem to be less of a problem... hopefully).

Eventually I found this problem can result from renaming a directory by chopping-off the name's final character(s) -- which, in certain cases, can leave a space (or spaces) embedded in the end of the name.

Using a ZTree Rename mask is generally a "good solution" for many applications, but it can also cause this type of problem.

Here are two examples of ZTree Rename masks that can cause problems: ... */.* ...... */////.*

As an experiment, I tried creating a 3rd-level sub-directory, named: ... 22222 55

Then I deleted the final '55' characters, using this Rename mask ... *//.*

Next I used ZTree to try to Delete this sub-directory (where its name has an invisible 'end space').

Instead of deleting the Directory, ZTree responded with... "Error: [02] File Not Found".

( The directory deleted just fine after deleting one character from the end. )
...

Note: - Another strange problem occurs in ZTree when the target directory name ends with invisible space(s)... In Directory View, the Edit command ("Enter name of file to edit"...) creates a new file as expected -- however, the file is created elsewhere -- in the Root directory of the Drive that has the editor program's default Save directory (...which is on a different drive, in my test case).
...

From what I've seen, the only place that the space(s) at the end of a directory name are VISIBLE, is in the ZTreeWin console title bar (using the default configuration).

This is seen in File Mode's Directory View, where the path's final '\' (backslash) is seen "hanging" beyond the end of the name.

However, ZTree's command dialogs for Copy, Move and Extract... all display the paths of these same directories WITHOUT showing those same space(s) that do exist, before the final '\'.

Also, while not "clearly visible", except perhaps on shorter directory names, in ZTree's Alt-Info display the "Length:" counter does correctly include the invisible spaces. (For example, you might see only a two-character name, while the Length counter CORRECTLY says the length is three, or four.)
...

The "fix" for this type of problem is to Delete at least one character from the BEGINNING, MIDDLE, or END of the directory name. This causes Windows to "reformat" the name correctly, and the end spaces are removed.

But the problem is... How can a complete drive be quickly scanned to detect, list, and repair these Directory names that have invisible 'end spaces', before they cause strange problems?


ZTree could "instantly" scan, detect, and list the directories that have this problem... "if".

That is, "if" a space (or its alias) is added to the allowable characters that can be used in a ZTree Filter.

Then, if the directory names with problems are numerous, ZTree's list of them could be used to help automate the repair -- preemptively.



Bill

1,336 views      
Thread locked
 

Messages in this Thread

 
96,646 Postings in 12,231 Threads, 350 registered users, 58 users online (0 registered, 58 guests)
Index | Admin contact |   Forum Time: Apr 28, 2024 - 7:42 am UTC  |  Hits:63,111,405  (6,075 Today )
RSS Feed