Solved

NTFS permissions

Posted on 2007-04-06
7
402 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure 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...
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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 …

930 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

12 Experts available now in Live!

Get 1:1 Help Now