SQLite Forum

Using fsdir and .mode columns
Login

Using fsdir and .mode columns

(1) By anonymous on 2020-07-26 07:19:59 [link] [source]

Using fsdir and .mode columns on windows cuts the name column just after the name/dir specified as parameter:

SQLite version 3.32.3 2020-06-18 14:00:33
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .mode columns
sqlite> SELECT name FROM fsdir('C:\one\two\three');
C:\one\two\three
C:\one\two\three
C:\one\two\three
C:\one\two\three
C:\one\two\three

sqlite> .mode list
sqlite> SELECT name FROM fsdir('C:\one\two\three');
C:\one\two\three
C:\one\two\three/four
C:\one\two\three/four/five
C:\one\two\three/four/five/six
C:\one\two\three/four/five/six/testfile.tmp

Philip

(2) By Richard Hipp (drh) on 2020-07-26 11:51:26 in reply to 1 [link] [source]

Try again with the latest prerelease snapshot

(3) By anonymous on 2020-07-27 07:43:30 in reply to 2 [link] [source]

Works 100%.

Sorry for the noise, will use/test both release and snapshots in future.

Philip

(4) By ddevienne on 2020-07-27 08:23:05 in reply to 1 [source]

[OT] Should the output mix back and forward slashes?
Instead of normalizing to the platform's native file separator?
Or always normalize to forward slash?