Results 1 to 7 of 7

Thread: File Creation Date - Batch File

  1. #1
    Senior Knight [AK]Nuts's Avatar
    Join Date
    Nov 2003
    Location
    San Francisco, California
    Posts
    2,738

    File Creation Date - Batch File

    Okay, I'm stumped and before I turn it over to a corporate programer, I'm hoping you can find the answer for me:

    DOS batch file or a script that will scan a directory. If a file (.act) exists and that file is more than one hour old then stop a system service, delete the file in question then restart the service.

    I'll us scheduler to handle the reoccurance issues but so far the only thing I've got is an old Win95 program that wont work in XP.

    Any takers?

  2. #2
    Moderator

    August Knights
    [AK]Devil_Dog's Avatar


    Join Date
    Nov 2001
    Location
    Spring City, PA
    Posts
    1,779
    Just be careful when running that type of script. If someone does a copy form one folder to another the creation date will change and you could lose more then you bargained for....

  3. #3
    Loved By All [AK]Choozoo's Avatar
    Join Date
    Oct 2002
    Location
    NY
    Posts
    2,820
    If you can, use PERL. Otherwise, turn it over. That would look like a nightmare in DOS. Not to mention DOS/Windows time functions are very limited.

  4. #4
    Moderator

    August Knights
    [AK]Devil_Dog's Avatar


    Join Date
    Nov 2001
    Location
    Spring City, PA
    Posts
    1,779
    Yes, yes, to Choozoo you listen...

  5. #5
    Senior Knight [AK]Nuts's Avatar
    Join Date
    Nov 2003
    Location
    San Francisco, California
    Posts
    2,738
    I poked around more last night and this morning and have decided to farm it out to our programers. Arg! I hate giving up like this.

  6. #6
    Who is Nuts and Abbadon? [AK]StitchJones's Avatar
    Join Date
    Oct 2002
    Location
    Ballston Spa NY
    Posts
    4,134
    I agree with Choozoo. Use a simple PERL script that is mainly based with regular expressions to look for that data. Then you can navigate around the files that way. Also for Services, you can use the WIN32::Service module to start and stop the service you need.

    On the flip side, your best bet is to use a VBS script that will take the existing file and 'rename' it with a time stamp. This way you can create a safe file archive of old files. This is less dangerous to the system. You could even have those renamed files move into a 'arch' folder and setup a seperate delete function for that.


  7. #7
    Who is Nuts and Abbadon? [AK]StitchJones's Avatar
    Join Date
    Oct 2002
    Location
    Ballston Spa NY
    Posts
    4,134
    Quote Originally Posted by [AK]Nuts
    I poked around more last night and this morning and have decided to farm it out to our programers. Arg! I hate giving up like this.
    FR0G PU$$3Y!!!!


Similar Threads

  1. Flash File
    By Bassiswild in forum Technical Support
    Replies: 5
    Last Post: 05-05-2005, 06:33 AM
  2. File Forwarding
    By [AK]Nuts in forum Operating Systems & Applications
    Replies: 1
    Last Post: 04-25-2005, 02:32 PM
  3. File Association
    By Drewski in forum Operating Systems & Applications
    Replies: 4
    Last Post: 03-02-2003, 10:55 AM
  4. I need a File ASAP
    By Drewski in forum Technical Support
    Replies: 11
    Last Post: 09-01-2002, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •