PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Apache
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2008, 12:41 PM
PPCFreak's Avatar
Almost a VIP
Offline
Pocket PC: HTC TP2
Carrier: Verizon
Location: Midwest US
 
Join Date: Feb 2007
Posts: 948
Reputation: 1271
PPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Script to delete file every so often

I need a configurable program/script that I can set to delete a certain file every so many days.

The file is not in ROM and I can delete it manually but it would be very nice if an automated task could delete this file every day at a certain time..etc.

Much like a .bat file and task scheduler for Windows XP, only for WM6.1.

Thanks.
__________________
TP2 CDMA HSPL Unlocker is here
Don't Forget to Say 'Thanks'.

NRGz Wiki/FAQ Here
NRGz 29022 Sense 2.5 CHT1.8.5 Jul 4th
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 12:58 PM
Perasite's Avatar
Retired Staff
Offline
Pocket PC: HTC Touch Pro
Carrier: Sprint
Location: Yuma, AZ
 
Join Date: Sep 2006
Posts: 1,929
Reputation: 2026
Perasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Script to delete file every so often

Try MortScript. I'm sure it can be done. MortScript will let you set things to occur at a specific time or every x number of hours (or days, minutes, etc.) If you need help with the syntax, let me know, but the MortScript manual is pretty good.

http://www.sto-helit.de/index.php?mo...st&category=18
__________________
Now with VGA support on all software!

Projects: (PeraStats 1.7) (PeraCount with Clock 1.3) (PeraCount 1.3) (PeraProfiler 1.2) (S2U2Lock 1.1)
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 11:24 AM
PPCFreak's Avatar
Almost a VIP
Offline
Pocket PC: HTC TP2
Carrier: Verizon
Threadstarter
Location: Midwest US
 
Join Date: Feb 2007
Posts: 948
Reputation: 1271
PPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Script to delete file every so often

Yuma,
Can you send me an example .mscr file for this?

Also, how does one start mortscript?
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 01:08 PM
Perasite's Avatar
Retired Staff
Offline
Pocket PC: HTC Touch Pro
Carrier: Sprint
Location: Yuma, AZ
 
Join Date: Sep 2006
Posts: 1,929
Reputation: 2026
Perasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIPPerasite is a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Script to delete file every so often

Once you install mortscript on your PPC, any .mscr you launch will invoke mortscript as required. What I would do in your case is install mortscript, place my .mscr in /Program Files/Autodelete/ and then put a link to your .mscr in /Windows/Startup/

This code should delete the file /My Documents/file.doc every 3 hours
<code>
SECONDS = 1000
MINUTES = ( 60 * SECONDS )
HOURS = ( 60 * MINUTES )
While (1)
Delete ( "/My Documents/file.doc" )
SLEEP ( 3 * HOURS )
EndWhile
</code>
The SECONDS, MINUTES, HOURS portion is not required, but makes it easier to determine how often the script will run.

You can also write code that would run at a specific time each day. It would need to be in 2 seperate files. Schedule.mscr would be run one time to set the notification queue for the second file. Delete.mscr would be called by the notification queue at the proper time. Nothing would need to be placed in /Windows/Startup/ for this to work. I've never worked with the notification queue, though, and would suggest starting out with the code above.
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 01:54 PM
PPCFreak's Avatar
Almost a VIP
Offline
Pocket PC: HTC TP2
Carrier: Verizon
Threadstarter
Location: Midwest US
 
Join Date: Feb 2007
Posts: 948
Reputation: 1271
PPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on repPPCFreak is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Script to delete file every so often

Yuma; Thanks for the response and exmaple.
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Apache


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 12:58 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com