Solved

NTFS permissions

Posted on 2007-04-06
7
409 Views
Last Modified: 2013-12-04
We are currently using Excel spreadsheets for our timesheets, and I need some help with NTFS permissions.  If I do not give our users the right to delete files in their timesheet folder, then Excel temporary files pile up in the folder that contains their timesheet.  I do not want them to be able to delete their timesheets, but I do not want to be clearing out all of the built up temporary files from each time they open their timesheet.  Any suggestions on how I might tackle this one with advanced NTFS permissions or some other method?
0
Comment
Question by:mauisun
  • 3
  • 3
7 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18868517
I would hit it from a system standpoint...let the System account do your cleanup...

From a command prompt,
schtasks /create /ru system /sc daily /st 15:00:00 /tn ExcelCleanup /tr "cmd /c del c:\Data\*.tmp"

Changing the path and file name specification as necessary...
0
 
LVL 1

Author Comment

by:mauisun
ID: 18868531
Thanks for an amazingly quick reply!  That certainly sounds like the right way to handle it.  So, can I assume that there is no way around this one by just altering advanced NTFS permissions?
0
 
LVL 1

Author Comment

by:mauisun
ID: 18868566
I tried your scheduled task example and it worked perfectly.  Can this task be made to delete all temporary files within subfolders since each user has their own subfolder within a common timesheet folder, or do I need to create an individual task for each user folder?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 27

Expert Comment

by:Tolomir
ID: 18869063
Of cause you could delete all files and subfolders then it would be something like:

RD C:\BLAH /S /Q

but keep in mind that open excel sheets also got some temp files, so I suggest you delete just files that are older then e.g. 7 days.

Take this script instead:

http://www.databasejournal.com/img/deloldfiles.vbs_

summed up it would be: (resusing sirbounty's good suggestion)

schtasks /create /ru system /sc daily /st 15:00:00 /tn ExcelCleanup /tr "cscript deloldfiles.vbs c:\dba\log 7"

deloldfiles.vbs is able to scan and delete in subfolders.

Tolomir
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18869466
Sure, that could work - I was under the impression this would be run after-hours...
If that's the case, just drop a /s on the end of the prior command:

schtasks /create /ru system /sc daily /st 15:00:00 /tn ExcelCleanup /tr "cmd /c del c:\Data\*.tmp /s"
0
 
LVL 1

Author Comment

by:mauisun
ID: 18870119
Thanks, sirbounty!  That is the exact solution that I needed.  It works perfectly.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18870468
Glad I could help.  Thanx for the grade! :^)
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Auto Populate Day Month  2 digit Date 4 19
formula how to get the number incrementor? 3 23
Unhide very hidden sheets with password 22 44
Rather Simple Formatting Question 6 23
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question