Solved

NTFS permissions

Posted on 2007-04-06
7
440 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 27

Expert Comment

by:Rainer Meller
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

632 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