Solved

NTFS permissions

Posted on 2007-04-06
7
428 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
Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

 
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

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

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

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

734 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