Jump to content

dichronic

Member
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by dichronic

  1. I ended up getting the Date command to work. Thanks for the links and the suggestions and getting me pointed in the right direction.
  2. Hi everyone, i'm very new to batch files and i'm looking for some help. I have a file being copied from one location to another, and then renamed. The name of the file in the source is "CT" plus the current date in the format MMDDYY. So, as an example, today's file would be called CT060911.txt and tomorrow would be CT061011.txt. This file is created everyday and I need to pull a copy of it everyday and put it in a new directory. I've created a batch file that copies the file, puts it in the appropriate directory, and then renames it to a new name, except for the part about automatically updating for the date. such as - copy "I:\CT060911.txt" "C:\Import" rename "C:\Import\CT060911.txt" NewName.txt My hope is to call the batch file from a scheduled task, and have the batch file automatically look for the file with the current date in the name. Most of the examples I've seen online seem to be concerned with renaming the file with the current date, instead of finding a file with the current date, and I can't seem to get things to work the other way around. Any help would be greatly appreciated. Thanks!
×
×
  • Create New...