Variable naming in command line version

  • Nobody/Anonymous

    Is it possible to create an archive name that is variable?  For example, I currently use RAR to create a backup file that uses the date as part of the archive name.  The command-line syntax is as follows:

    winrar.exe -ag_MM-DD-YYYY d:\backup\data.rar


    • PatLogan

      PatLogan - 2005-03-03

      try this :
      set date=%date:~11,4%-%date:~8,2%-%date:~5,2%

      and use %date% in the name of your file.

      to have explanations about the syntax, type set /? in the shell.

      (this is for frenchy format, maybe you'll have to change it for an other standard...)




Log in to post a comment.