job which copies files based on date in the filename.

  • hello all.

    i'm sure i'm not the only one who's looking for something

    like this, but i'm trying to create a job which will

    simply copy files from one folder to another based on

    the date YYYYMMDD which is included in the filename.

    basically if the YYYYMMDD is today, then copy files

    from here to there, if not, then do nothing.

    can this be done from an SQL job?

    any ideas?

    _________________________

  • Not sure why you would not consider a .bat( of dos commands) file or vb script file and use windows schedule tasks.

  • so by using a scheduled task i can parse the filename,

    and move the files based on that?

    for example: what if all files are named: MyFile2007050800.txt

    scheduled task will be able to see that date, and then move the

    file accordingly?

    _________________________

  • You will either write a .bat file or a .vbs script file with all the logic of parsing the file. You can use notepad to create the scripts.

    This script will be scheduled windows schedule tasks.

  • I always use ROBOCOPY for this kind of thing. It was included in the resource kits for win nt and win 2000, I am not sure if it comes with 2003 anymore, but you should be able to find it.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply