John Vey
Guest
|
Post by John Vey on Feb 20, 2019 1:00:08 GMT 1
Inside the autoexec.txt, I want to test for existence of a file with a long filename with "IF EXIST" before starting a DOS program. Lets say I have the file "All Data Files.accdb" in the C:\temp folder along with various 8.3 files with extensions .DBF, .MDX, .TXT
"autoexec.txt"
USE S: C:\temp S: DIR
This only displays the 8.3 files. The long filename file isn't even listed with an abbreviated 8.3 name like "ALLDAT~1.ACCDB" as I was expecting. I created a long work around, but looking for something less complex. Any thoughts?
|
|
|
Post by Jos on Feb 20, 2019 10:55:36 GMT 1
Don’t see the logic, why not create "AllDataF.acc", or any other 8.3 file name, instead of "All Data Files.accdb".
But if you use the latest vDos version, and creating SFN isn’t turned off in Windows, "ALLDAT~1.ACC" should be shown.
Jos
|
|
John Vey
Guest
|
Post by John Vey on Feb 20, 2019 14:45:13 GMT 1
.accdb is the file extension for MS Access. I created some Access reports for a clients legacy dBase system. When an Access database is opened, it creates a lock file with the extension .laccdb. I want to check for that file on the network so I can write some logic to have it closed before processing in the legacy dBase application.
When I rename the file to AllData.accdb, it still does not show. If I rename to AllData.acc it shows, but no longer launches as an Access database. I copied Word and Excel documents to the folder with extensions .docx and .xlsx respectively and those files do not show either.
|
|
|
Post by Jos on Feb 20, 2019 15:45:56 GMT 1
DOS filename extensions consists of at most 3 characters, so AllData.accdb is no SFN. And if it doesn’t for instance show in a file listing, you don’t use the latest vDos version, or SFN are not created.
Jos
|
|
Herman
Guest
|
Post by Herman on Feb 21, 2019 9:37:33 GMT 1
Hello Guest, Jos,
Of course that can be done with vDos and cmd.exe. I do that almost every day in my dBase for DOS program. Just out of my head how that goes internally: From your DOS application start the CMD prompt with write dir to textfile and then read this textfile back into the DOS application. Then retrieve the weather data or the file exists in the text file.
Depending on what application or internal assignment can communicate outside. In my case with Dbase for DOS version 5 no problem at all. I manage on this moment at least 60 Gb of Genealogy data and 2.5 Terrabyte of music with long file names in this way
Regards Herman
|
|