system
October 30, 2013, 5:50pm
1
(imported topic written by cstoneba)
I need to create a way to determine if a list of filesnames that reside in a file exists on an endpoint. The problem i’m having is that if the file doesn’t exists on the endpoint, there are no results for it, and I need the result to be “false” rather than null. Anyone have any workarounds?
q: (names of it, size of it) of files (lines of file “c:\files.txt”)
A: notepad.exe, 179712
A: calc.exe, 776192
T: 0.654 ms
I: plural ( string, integer )
q: lines of file “c:\files.txt”
A: c:\windows\system32\notepad.exe
A: c:\asdflaskjfd.txt
A: c:\windows\system32\calc.exe
T: 0.395 ms
I: plural file line
(imported comment written by MattPeterson)
Is this what your looking for?
q:
(
it,
exist
file
it
)
of
(lines
of
file
“c:\list.txt”
)
A:
C:\windows\System32\notepad.exe, True
A:
C:\windows\System32\calc.exe, True
A:
C:\as;lfasdjf.txt, False
T:
0.829 ms
system
October 30, 2013, 6:22pm
3
(imported comment written by cstoneba)
perfect. thanks.
final version:
(it, (if (exist file it) then (size of file it as string) else “File Missing”) ) of (lines of file “c:\files.txt”)
A: c:\windows\system32\notepad.exe, 179712
A: c:\asdflaskjfd.txt, File Missing
A: c:\windows\system32\calc.exe, 776192
T: 0.924 ms
I: plural ( file line, string )
system
November 4, 2013, 6:11pm
4
(imported comment written by cstoneba)
does anyone know how to achieve this same thing but with registry key paths in the file rather than directories?
q: lines of file “c:\files.txt”
A: hkey_local_machine\software\bigfix
A: hkey_local_machine\test213
system
November 8, 2013, 7:27pm
5
(imported comment written by cstoneba)
can anyone assist with this? As soon as I use “of registry”, what it sees as “it” goes from the registry to the lines of the file and it errors out.
(imported comment written by liuhoting)
I haven’t worked this one out all the way yet but I think I got some of it… Here check this out:
Text file:
hkey_local_machine\software\bigfix
hkey_local_machine\software\bigfix
hkey_local_machine\software\abc
Q: (names of it) of keys ((lines of file “C:\linesofregistry.txt”) as string) of registry
A: bigfix
A: bigfix
T: 0.497 ms
For registry keys that don’t exist it looks like it will just not print them out…
system
November 11, 2013, 9:02pm
7
(imported comment written by cstoneba)
hi, that does work, however it doesn’t show for keys that do not exist (which was the same problem i had originally for files/folder, but found the workaround (
(
it,
exist
file
it
)
of
(lines
of
file
“c:\list.txt”
)) but that doesn’t seem to work for “key” because of the “of registry”.