- Jun
- 760
- 16
I would like to request that the ability be added to the FSEARCH command to work with the pseudofiles TMP#: and CLIP#:.
I was writing code to see if folder monitoring was in effect for a specific directory. I tried redirecting the output of FOLDERMONITOR to TMP1: and then searching it for the folder path.
When that didn't work, I discovered that FSEARCH doesn't work with the pseudofiles (and it gave no error message). Instead, I had to revert to the messy old method of redirecting to a temporary file.
It also appears that one cannot pipe into FSEARCH, so the following also did not work (with or without "con:" as the file). That feature, too, should be added to FSEARCH.
Ironically, the "obsolete" FFIND does accept redirected input! So I can use the following code:
I was writing code to see if folder monitoring was in effect for a specific directory. I tried redirecting the output of FOLDERMONITOR to TMP1: and then searching it for the folder path.
Code:
foldermonitor > tmp1:
fsearch /q /t"folder" tmp1:
if %_fsearch_matches GT 0 ...
When that didn't work, I discovered that FSEARCH doesn't work with the pseudofiles (and it gave no error message). Instead, I had to revert to the messy old method of redirecting to a temporary file.
It also appears that one cannot pipe into FSEARCH, so the following also did not work (with or without "con:" as the file). That feature, too, should be added to FSEARCH.
Code:
foldermonitor | fsearch /q /t"folder"
Ironically, the "obsolete" FFIND does accept redirected input! So I can use the following code:
Code:
foldermonitor |! ffind /q /t"folder"
if %_ffind_matches GT 0 ...