- Jun
- 1,092
- 48
I have been running into a problem with the @FILES function that results in various problems that are quite confusing. Sometimes in files seeming to disappear or causing the TCC session to pop out of TCMD and becomes a standalone session. (If I do these tests in a standalone session, it just terminates.)
The first ECHO command worked, but when I recalled it from the history and ran it again, TCC crashed and a new standalone TCC session started.
The issue seems to have something to do with the exclusion range. Here's a simpler command sequence.
This time the TCC tab did not crash, but the command no longer produce output. Hmmm, what's going on now? A command line with the @FILES function produces no output, but other commands do. It's as if the FILES function has been deleted from TCC.
I just ran through some of the same commands in TCC versiions 35 and 34, and they crash the same way. The FILES function works the first time, but when it is repeated, the TCC session crashes.
The simplest demonstration turns out to be a simple repeat of a command like echo %@files[[/[!*.mp3] *]. It runs the first time and crashes on repeat (or stops producing output).
Code:
[TCC36.50.71 (55704) C:\temp]
->*dir /[!*.mp3 *.x*] ra*
Volume in drive C is Windows Serial number is a879:820d
Directory of C:\temp\ra*
2/25/2025 0:24 <DIR> Raytheon_Msg_to_Jay_in_Japan
5/08/2016 19:21 8,380 Raff.txt
2/25/2016 15:14 616,728 Raff_Family_Generations_Report.pdf
2/25/2016 15:14 87,211 Raff_Family_Outline_Descendant_Report.pdf
712,319 bytes in 3 files and 1 dir 720,896 bytes allocated
295,763,648,512 bytes free
[TCC36.50.71 (55704) C:\temp]
->echo %@files[/[!*.mp3 *.x*] ra*,-d]
3
[TCC36.50.71 (50088) C:\temp]
->echo %@files[/[!*.mp3 *.x*] ra*,-d]
The first ECHO command worked, but when I recalled it from the history and ran it again, TCC crashed and a new standalone TCC session started.
The issue seems to have something to do with the exclusion range. Here's a simpler command sequence.
Code:
[TCC36.50.71 (57780) C:\temp]
->echo %@files[/[!*.mp3] ra*]
5
[TCC36.50.71 (57780) C:\temp]
->echo %@files[/[!*.mp3] ra*]
[TCC36.50.71 (57780) C:\temp]
This time the TCC tab did not crash, but the command no longer produce output. Hmmm, what's going on now? A command line with the @FILES function produces no output, but other commands do. It's as if the FILES function has been deleted from TCC.
Code:
[TCC36.50.71 (57780) C:\temp]
->echo number of files: %@files[/[!*.mp3] ra*]
[TCC36.50.71 (57780) C:\temp]
->echo test
test
I just ran through some of the same commands in TCC versiions 35 and 34, and they crash the same way. The FILES function works the first time, but when it is repeated, the TCC session crashes.
The simplest demonstration turns out to be a simple repeat of a command like echo %@files[[/[!*.mp3] *]. It runs the first time and crashes on repeat (or stops producing output).