Need Help:Search & Delete a file on given date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nals
    Forum Member
    • Feb 2007
    • 206

    Need Help:Search & Delete a file on given date

    Can someone help me, I want search and delete a file, when a date given,

    Eg: before run the application It checks for the system date:
    If systemdate = givendate
    search drives for the application and delete itself
    If systemdate <> given date run the application
    Run the application.

    Hope this is clear ;;

    (Just need the if statement , to check for system date ) rest of them I can do it.


    Thanks
  • CrazyFrog
    Forum Member
    • Jan 2007
    • 118

    #2
    Try This :

    month = "04" -- the month you want the action to happen
    day = "06" -- the day you want the action to happen
    year = "2007" -- the year you want the action to happen
    current_day = System.GetDate(5); -- gets the current day
    current_month = System.GetDate(4); -- gets the current month
    current_year = System.GetDate(6); -- gets the current year
    if day == current_day and month == current_month and year == current_year then -- the if statement with the " and " operator
    action -- here you put the desired action
    end
    Last edited by CrazyFrog; 04-06-2007, 02:13 AM.

    Comment

    • nals
      Forum Member
      • Feb 2007
      • 206

      #3
      CrazyFrog , Thank you !! thats working nicely, Perfect
      thats what I want

      :yes

      Comment

      • CrazyFrog
        Forum Member
        • Jan 2007
        • 118

        #4
        no problem :yes

        Comment

        Working...
        X