Hi,
I'm looking to create a batch file that will run the net file command on a PC to output a list of all of the open files and then from the created list search and extract the lines where a certain text string is present.
I would then want to extract all none required data from the serach results to leave only the ID No of the open files. I would then use the ID No again with the net file command to close the open files I want.
I'm hoping that someone can advise on what command I need to use to search on and extract the data I need but also maybe point me in an alternative direction to achieve what I'm looking to achieve if there is a better way.
The whole purpose of this is to give a none admin user permission to close certain open files on our server.
Many Thanks.
I'm looking to create a batch file that will run the net file command on a PC to output a list of all of the open files and then from the created list search and extract the lines where a certain text string is present.
I would then want to extract all none required data from the serach results to leave only the ID No of the open files. I would then use the ID No again with the net file command to close the open files I want.
I'm hoping that someone can advise on what command I need to use to search on and extract the data I need but also maybe point me in an alternative direction to achieve what I'm looking to achieve if there is a better way.
The whole purpose of this is to give a none admin user permission to close certain open files on our server.
Many Thanks.