|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Please help me I want to delete the following from the servers profiles shares (profile$) automatically jpcache cookies application data\adobe\acrobat application data\microsoft\html help application data\sun\java\deployment\cache application data\jasc software inc\cache and these file types *.tmp* *~.* *.~* *.old file*.chk |
|
#2
|
||||
|
||||
|
Please provide a little more detail. Are you running this script from the server? Are the profiles all housed on the server? What OS is the server running?
Is it safe to assume that all profiles are at C:\Documents and Settings\profilename?
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
|
#3
|
|||
|
|||
|
Quote:
Hi Niplo, I have profiles stored in 4 windows 2003 servers. The profiles loaation is F:\Profile Directory\profilesname...and shared as profiles$ om all the servers We can run the script from the server. |
|
#4
|
||||
|
||||
|
Okay...a couple more questions...sorry.
You want to delete *.tmp* *~.* *.~* *.old file*.chk these files recursively starting at the root of your share, right? Meaning in any folder in or under it. Also, jpcache, and cookies -- those are folders in your profile$ root? And lastly...what kind of authentication are you using? Do you have an IUSR_Computername account on these machines or are you using an administrator account? And are you using Active Directory? Basically, I'm trying to determine what the easiest method is for you. You can do this plainly with the FileSystemObject by providing paths, but authentication is sometimes tricky. You can also use WMI (DCOM/RPC) or LDAP (ADSI), but these are more complicated methods. A third option would be to run each of the scripts locally from each of the servers by copying it remotely via the WshController object. |
|
#5
|
|||
|
|||
|
Quote:
Your got it right that I want to delete *.tmp* *~.* *.~* *.old file*.chk all these files recursively starting at the root of your share in any folder in or under it also would like to delete any files under the jpcache, and cookies folders which are under my profile$ root...I have these two folders in every profile directory as I have romaing profiles. I'm using Active directory but the 4 servers are member servers so I have both IUSR_Computername and administrators on those. I'm using these to keep the roaming profiles. |
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > How do I use vbscript to automatically delete files in a Folder and Subfolders ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|