Need to automate a file move every night

Discussion in 'Software' started by themeaner, Apr 6, 2005.

  1. themeaner

    themeaner Private E-2

    I have a access file that a new one is created every night with the file name in the format of year-month-day. I need a file that will take the day before file and copy it to another location. Any Ideas on how I can accomplish this
     
  2. Wookie

    Wookie Sergeant Major

    Using any language of your choice I would write a program that gets todays date and vonvert it to whatever format the date of the filename is in

    say 04-05-2005, use a date function to convert the format then append ito the filename, in php or perl

    $filestart = "myfile"
    $date = "04-05-2005" //you would use a function to get this

    $filename = $filestart . $date . ".exe"


    then just use some sort of system command to move the file, using c++ I would import the standlib



    #include<stdlib.h>


    them use system command to issue a command to the system using a string with the filename and the proper system commands like MOVE for windows based.


    Then using the task scheduler after you compile set it to run that exe every night




    sorry for 2 langages but I dont know how to issue system commands in a perl or php based system for windows.

    you should get the drift tho, let me know if that helps.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds