Solved

NTFS permissions

Posted on 2007-04-06
7
395 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now