Hello, I am not very familiar with this line of code and how to modify it with a variable.
How do I change the line for the path to use a variable for current directory? Instead of calling a path between ' ' I was trying to enter a variable for the current directory, but I kept getting errors.
Thanks!
Code:
Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Temp'} Where " _
& "ResultClass = CIM_DataFile")
How do I change the line for the path to use a variable for current directory? Instead of calling a path between ' ' I was trying to enter a variable for the current directory, but I kept getting errors.
Thanks!