How to Schedule Folder Content Deleting Task

mnr367

New member
Local time
1:18 AM
Messages
30
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 Computer

OS
Windows 7
With Task Scheduler of course...
Something else you need?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
thanks a lot.... i love this forum
 

My Computer

OS
Windows 7
No problem.
 

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
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 Computer

OS
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..

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 Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
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 Computer

OS
Windows 7

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
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 Computer

OS
Windows 7
Don't worry, we're going to get this! I'm working out a batch that will accomplish this. There are some other commands we have to use but I need to ask, are you trying to delete everything inside of this folder? "C:\Users\{user here}\AppData\Isolated Storage"

If yes, is this batch going to be used for multiple users?
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
Don't worry, we're going to get this! I'm working out a batch that will accomplish this. There are some other commands we have to use but I need to ask, are you trying to delete everything inside of this folder? "C:\Users\{user here}\AppData\Isolated Storage"

If yes, is this batch going to be used for multiple users?


yes i am trying to delete everything inside the folder.... not needed for multiple users... i have only one user in my os
 

My Computer

OS
Windows 7
I got it! Copy this code into a text file (be sure to replace "username" with your actual account name) and save it as .bat:

Code:
@echo off
pushd "C:\Users\username\AppData\Local\IsolatedStorage"
for /d %%d in (*.*) do rmdir /s /q "%%d"
del /q *.*
popd

That should be all. Let me know if this works for you!
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
I got it! Copy this code into a text file (be sure to replace "username" with your actual account name) and save it as .bat:

Code:
@echo off
pushd "C:\Users\username\AppData\Local\IsolatedStorage"
for /d %%d in (*.*) do rmdir /s /q "%%d"
del /q *.*
popd

That should be all. Let me know if this works for you!

Wow .... that worked.... ur amazing... i love this forum...

I also like to learn some computer languages .... i don't have any idea about it....

Thanks a lot
 

My Computer

OS
Windows 7
Thanks, glad I could help! I am fairly new to this forum as well.

I think you can also mark the thread as solved. Thanks!!
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
Thanks for all the help in solving my first query....

I have one more problem which is similar to the old one... so i thought lets ask it here instead of creating a new thread...

I scheduled a Disk Cleanup during every Log on .... But the problem when i do the Disk cleanup Directly.. its cleaning all the temporary internet files , wipe data in recycle bin...

But when the schedule run its not deleting anything .... it just run and show cleaning ...
But its not deleting Temporary internet files and Recycle bin Data ...

Please help me to fix this issue
 

My Computer

OS
Windows 7
To help with testing / troubleshooting BAT files:

Add a pause statement at the end of the BAT file.

This will keep the BAT CMD window open until you hit enter to continue.
See if you can find any errors listed in the BAT CMD window before you close it.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
To help with testing / troubleshooting BAT files:

Add a pause statement at the end of the BAT file.

This will keep the BAT CMD window open until you hit enter to continue.
See if you can find any errors listed in the BAT CMD window before you close it.

thanks for ur kind reply ......please look at my last post..... the problem with the bat file is already solved...
 

My Computer

OS
Windows 7
I wasn't sure if your last issue / question in post #16 (Disk Cleanup) used a BAT file...
If the issue in Post # 16 is totally different than the issue in this thread, I would start a new thread...
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
Is there a particular reason you feel you need to run Disk Cleanup at each logon? I would find that as a little bit overkill...
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64, BackTrack Linux 5 R2, Windows XP
CPU
Intel Core i7 920 OC to 3.6GHz
Motherboard
ASUS P6T Deluxe V2
Memory
Corsair 6GB DDR3
Graphics Card(s)
ATI Radeon 4890
Monitor(s) Displays
ASUS 23"
Screen Resolution
1920x1080
Hard Drives
150GB Velociraptor
640GB
PSU
Corsair 850w
Case
CoolerMaster HAF932
Cooling
CoolerMaster V8
Internet Speed
30Mbps
Back
Top