Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to Schedule Folder Content Deleting Task


13 Jun 2012   #1

Windows 7
 
 
How to Schedule Folder Content Deleting Task

In my office , a program to launch we need to deleted the contents of the folder
C: users >local> app data > isolated stoarge > Delete Contents.

How can i schedule this Task . so no need to go to every system and delete this files automatically.

My System SpecsSystem Spec
.

13 Jun 2012   #2

Windows 8.1 Pro (x64)
 
 

With Task Scheduler of course...
Something else you need?
My System SpecsSystem Spec
13 Jun 2012   #3

XP / Win7 x64 Pro
 
 

Create a .bat file with whatever name you like and the following line inside (where the path given is the one with the files you'd like to delete):

del /F /Q "C:\Users\Local\AppData\Isolated Storage\Delete Contents\*.*"

Then, create a new task to run that batch file at whatever interval you'd like.

Task Scheduler - Create New Task
My System SpecsSystem Spec
.


14 Jun 2012   #4

Windows 7
 
 

thanks a lot.... i love this forum
My System SpecsSystem Spec
14 Jun 2012   #5

XP / Win7 x64 Pro
 
 

No problem.
My System SpecsSystem Spec
18 Jun 2012   #6

Windows 7
 
 

i tried creating a .bat file using the same code.
My user name is ' vasan ' so i write it like
-- del /F /Q "C:\Users\vasan\AppData\Local\IsolatedStorage\Delete Contents\*.*" --
But its not deleting the contents of the folder.

Is the code correct? do it need to be tweaked to make it actually delete the contents..
My System SpecsSystem Spec
18 Jun 2012   #7

Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
 
 

Quote   Quote: Originally Posted by mnr367 View Post
i tried creating a .bat file using the same code.
My user name is ' vasan ' so i write it like
-- del /F /Q "C:\Users\vasan\AppData\Local\IsolatedStorage\Delete Contents\*.*" --
But its not deleting the contents of the folder.

Is the code correct? do it need to be tweaked to make it actually delete the contents..
If you want to delete the contents of the IsolatedStorage folder, then remove the \Delete Contents\ piece from the code, so it reads "C:\Users\vasan\AppData\Local\IsolatedStorage\*.*"

Also, if you wanted this task to run silently (for a login script), you'll have to create a VBS file with the following code. Copy and paste this into a text file and change the path to point to your batch file, and save the text file as .vbs:

Code:
dim shell
set shell=createobject("wscript.shell")
shell.run "\\someserver\netlogon\locationofBATfile.bat"
set shell=nothing
Then, in your Group Policy (if you're working in a Windows domain), add the new VBS script to your Login Scripts.

If you're still having problems with it deleting it could be due to file permissions. If you push this via GPO, it should run under the System/Network account and should delete.
My System SpecsSystem Spec
19 Jun 2012   #8

Windows 7
 
 

Hey bro i tried changing the code to what u show... it still not deleting the contents.. i checked file permissions its all set to allow ....

I am an intern .... i don't have any experience with VB Scripts

One thing i noticed .... i scheduled a disk cleanup during system logon.... the cleanup process take place during every logon but its not erasing any temporary files & the files in the Recycle bin......

What else is left to do...
My System SpecsSystem Spec
19 Jun 2012   #9

Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
 
 

I just ran a test batch with the above information and realized it only deletes contents in the parent folder. So, if you have subfolders in the folder you want to clear, they won't delete with this batch.

Here is a link that may help you.
Create Batch file to delete files and subfolders, but not root folder
My System SpecsSystem Spec
19 Jun 2012   #10

Windows 7
 
 

Bro this is the code that i got

set folder="C:\test"
cd /d %folder%
for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)

I don't have much experience with these code..... can you please make it simple for me ....
My System SpecsSystem Spec
Reply

 How to Schedule Folder Content Deleting Task




Thread Tools



Similar help and support threads for2: How to Schedule Folder Content Deleting Task
Thread Forum
Schedule a task for when computer is idle Performance & Maintenance
Schedule task to run when a new profile is created using Win 7 General Discussion
how do schedule a task when another program exists Software
how to set a schedule task to run chkdsk General Discussion
Schedule a task Customization
How do I schedule a Windows task to run in the foreground? Software
Can I schedule a XP Mode task from Win 7? Virtualization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:44 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33