![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Delete all *.prf files in a certain directory on multiple computer I have a text file with one computer name per line. What I need to do is on every one of those computers, if there are any files with a .prf extension in c:\program files\microsoft office\ I need to delete them. Does anyone have a script that would do this so I don't have to do it manually on hundreds of computers? |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Delete all *.prf files in a certain directory on multiple computer Also, as i'm finding out by doing some of them manually, some of the files are set to read-only, others aren't. "Rich" wrote: Quote: > I have a text file with one computer name per line. > > What I need to do is on every one of those computers, if there are any files > with a .prf extension in > c:\program files\microsoft office\ > I need to delete them. > > Does anyone have a script that would do this so I don't have to do it > manually on hundreds of computers? |
My System Specs![]() |
| | #3 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Delete all *.prf files in a certain directory on multiple computer Also, as i'm finding out by doing some of them manually, some of the files are set to read-only, others aren't. "Rich" wrote: Quote: > I have a text file with one computer name per line. > > What I need to do is on every one of those computers, if there are any files > with a .prf extension in > c:\program files\microsoft office\ > I need to delete them. > > Does anyone have a script that would do this so I don't have to do it > manually on hundreds of computers? |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple computer "Rich" <richjone@newsgroup> wrote in message news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup Quote: > Also, as i'm finding out by doing some of them manually, some of the files > are set to read-only, others aren't. > > "Rich" wrote: > Quote: >> I have a text file with one computer name per line. >> >> What I need to do is on every one of those computers, if there are any >> files >> with a .prf extension in >> c:\program files\microsoft office\ >> I need to delete them. >> >> Does anyone have a script that would do this so I don't have to do it >> manually on hundreds of computers? @echo off set Fld=program files\microsoft office for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul Remove the word "echo" in the last line to activate the batch file. Add the /S switch to the "del" command if you wish to process subdirectories. |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp I'd just like to run it from my computer, where I'm logged in with an account that's an admin on all the other machines. "CrucialHoax" wrote: Quote: > > Rich;1150758 Wrote: Quote: > > Also, as i'm finding out by doing some of them manually, some of the > > files > > are set to read-only, others aren't. > > > > "Rich" wrote: Quote: > > > > > > > > > I have a text file with one computer name per line. > > > > > > > > What I need to do is on every one of those computers, if there are > > > any files > > > > with a .prf extension in > > > > c:\program files\microsoft office\ > > > > I need to delete them. > > > > > > > > Does anyone have a script that would do this so I don't have to do it > > > > manually on hundreds of computers? > > > Do you want to run this script from one computer and have it delete it > from every other computer, or run the script on every machine instead of > deleting the files? > > > -- > CrucialHoax > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp Thanks, I will give it a try. "Pegasus [MVP]" wrote: Quote: > > "Rich" <richjone@newsgroup> wrote in message > news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup Quote: > > Also, as i'm finding out by doing some of them manually, some of the files > > are set to read-only, others aren't. > > > > "Rich" wrote: > > Quote: > >> I have a text file with one computer name per line. > >> > >> What I need to do is on every one of those computers, if there are any > >> files > >> with a .prf extension in > >> c:\program files\microsoft office\ > >> I need to delete them. > >> > >> Does anyone have a script that would do this so I don't have to do it > >> manually on hundreds of computers? > The simplest method would be by batch file: > @echo off > set Fld=program files\microsoft office > for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul > > Remove the word "echo" in the last line to activate the batch file. Add the > /S switch to the "del" command if you wish to process subdirectories. > > > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp the paths look like they would work, but when i remove the echo, it doesn't delete anything. do we have to do something special to get it to work with UNC paths via the command prompt? "Pegasus [MVP]" wrote: Quote: > > "Rich" <richjone@newsgroup> wrote in message > news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup Quote: > > Also, as i'm finding out by doing some of them manually, some of the files > > are set to read-only, others aren't. > > > > "Rich" wrote: > > Quote: > >> I have a text file with one computer name per line. > >> > >> What I need to do is on every one of those computers, if there are any > >> files > >> with a .prf extension in > >> c:\program files\microsoft office\ > >> I need to delete them. > >> > >> Does anyone have a script that would do this so I don't have to do it > >> manually on hundreds of computers? > The simplest method would be by batch file: > @echo off > set Fld=program files\microsoft office > for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul > > Remove the word "echo" in the last line to activate the batch file. Add the > /S switch to the "del" command if you wish to process subdirectories. > > > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp Run this slightly modified version from a *Command Prompt*, then report what you see on the screen. @echo off set Fld=program files\microsoft office for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf "Rich" <richjone@newsgroup> wrote in message news:B6E8458A-84D3-4568-B210-121CE51BF360@newsgroup Quote: > the paths look like they would work, but when i remove the echo, it > doesn't > delete anything. do we have to do something special to get it to work > with > UNC paths via the command prompt? > > "Pegasus [MVP]" wrote: > Quote: >> >> "Rich" <richjone@newsgroup> wrote in message >> news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup Quote: >> > Also, as i'm finding out by doing some of them manually, some of the >> > files >> > are set to read-only, others aren't. >> > >> > "Rich" wrote: >> > >> >> I have a text file with one computer name per line. >> >> >> >> What I need to do is on every one of those computers, if there are any >> >> files >> >> with a .prf extension in >> >> c:\program files\microsoft office\ >> >> I need to delete them. >> >> >> >> Does anyone have a script that would do this so I don't have to do it >> >> manually on hundreds of computers? >> The simplest method would be by batch file: >> @echo off >> set Fld=program files\microsoft office >> for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul >> >> Remove the word "echo" in the last line to activate the batch file. Add >> the >> /S switch to the "del" command if you wish to process subdirectories. >> >> >> |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp it echos the right paths just as the previous version did, but now when I run it without the echo, all i get is The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The network path was not found. "Pegasus [MVP]" wrote: Quote: > Run this slightly modified version from a *Command Prompt*, then report what > you see on the screen. > @echo off > set Fld=program files\microsoft office > for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf > > > "Rich" <richjone@newsgroup> wrote in message > news:B6E8458A-84D3-4568-B210-121CE51BF360@newsgroup Quote: > > the paths look like they would work, but when i remove the echo, it > > doesn't > > delete anything. do we have to do something special to get it to work > > with > > UNC paths via the command prompt? > > > > "Pegasus [MVP]" wrote: > > Quote: > >> > >> "Rich" <richjone@newsgroup> wrote in message > >> news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup > >> > Also, as i'm finding out by doing some of them manually, some of the > >> > files > >> > are set to read-only, others aren't. > >> > > >> > "Rich" wrote: > >> > > >> >> I have a text file with one computer name per line. > >> >> > >> >> What I need to do is on every one of those computers, if there are any > >> >> files > >> >> with a .prf extension in > >> >> c:\program files\microsoft office\ > >> >> I need to delete them. > >> >> > >> >> Does anyone have a script that would do this so I don't have to do it > >> >> manually on hundreds of computers? > >> > >> The simplest method would be by batch file: > >> @echo off > >> set Fld=program files\microsoft office > >> for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul > >> > >> Remove the word "echo" in the last line to activate the batch file. Add > >> the > >> /S switch to the "del" command if you wish to process subdirectories. > >> > >> > >> > > |
My System Specs![]() |
| | #10 (permalink) |
| | Re: Delete all *.prf files in a certain directory on multiple comp The message means exactly what it says: That your path is incorrect. Try to type the following command from a Command Prompt for at least one of your machines, then report both the commands and the result. set Fld=program files\microsoft office dir \\xxx\c$\%Fld%\*.prf dir /s \\xxx\c$\%Fld%\*.prf Replace "xxx" with the valid NetBIOS name of a PC. By the way, did you realise that the folder "C:\Program Files\Microsoft Office" never contains any .prf files? If you omit the /s switch then you would get exactly what you currently see . . . "Rich" <richjone@newsgroup> wrote in message news:AE7CD18C-1731-4F1A-86DC-287D1BADD2C3@newsgroup Quote: > it echos the right paths just as the previous version did, but now when I > run > it without the echo, all i get is > > The system cannot find the file specified. > The system cannot find the file specified. > The system cannot find the file specified. > The system cannot find the file specified. > The system cannot find the file specified. > The network path was not found. > > > > "Pegasus [MVP]" wrote: > Quote: >> Run this slightly modified version from a *Command Prompt*, then report >> what >> you see on the screen. >> @echo off >> set Fld=program files\microsoft office >> for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf >> >> >> "Rich" <richjone@newsgroup> wrote in message >> news:B6E8458A-84D3-4568-B210-121CE51BF360@newsgroup Quote: >> > the paths look like they would work, but when i remove the echo, it >> > doesn't >> > delete anything. do we have to do something special to get it to work >> > with >> > UNC paths via the command prompt? >> > >> > "Pegasus [MVP]" wrote: >> > >> >> >> >> "Rich" <richjone@newsgroup> wrote in message >> >> news:322AD91B-5948-46E5-B7B4-5391559DCB9A@newsgroup >> >> > Also, as i'm finding out by doing some of them manually, some of the >> >> > files >> >> > are set to read-only, others aren't. >> >> > >> >> > "Rich" wrote: >> >> > >> >> >> I have a text file with one computer name per line. >> >> >> >> >> >> What I need to do is on every one of those computers, if there are >> >> >> any >> >> >> files >> >> >> with a .prf extension in >> >> >> c:\program files\microsoft office\ >> >> >> I need to delete them. >> >> >> >> >> >> Does anyone have a script that would do this so I don't have to do >> >> >> it >> >> >> manually on hundreds of computers? >> >> >> >> The simplest method would be by batch file: >> >> @echo off >> >> set Fld=program files\microsoft office >> >> for /F %%a in (c:\PCs.txt) do echo del /F \\%%a\c$\%Fld%\*.prf 2>nul >> >> >> >> Remove the word "echo" in the last line to activate the batch file. >> >> Add >> >> the >> >> /S switch to the "del" command if you wish to process subdirectories. >> >> >> >> >> >> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Delete files on remote computer | VB Script | |||
| Easy transfer...will it delete files from old computer? | Vista installation & setup | |||
| Can't select multiple files in my computer | Vista file management | |||
| WLM Generating Multiple 16MB Log files in storage directory | Vista mail | |||
| Cannot access C: root directory on Vista computer from XP computer | Vista networking & sharing | |||