Folder names should have the day like Monday Tuesday

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthikkumar
    New User
    • Jul 2015
    • 2

    Folder names should have the day like Monday Tuesday

    Dear Sir,
    Kindly let me know the beyond compare script for day format.
    We need to create new folder, Folder names should have the day – Monday Tuesday etc.. not the date. So that every week it will over write the last backup
    We have created new folder %date% format.Kindly suggest us to proceed the same.

    Please find the following beyond compare script.And please change the day format, Folder names should have the day – Monday Tuesday etc

    option confirm:yes-to-all
    load <default>
    load create:rt D:\temp D:\Backup_%date%
    sync create-empty mirror:left->right
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    Beyond Compare scripting does not have a variable for the weekday name. The two variables supported in script are the full date (%date%) and time (%fn_time%).

    To achieve what you are looking for, I would suggest setting up 7 Windows Scheduled Tasks. Each would call a different, but almost equal, script file. The Monday script would call ScriptMonday.txt:
    option confirm:yes-to-all
    load <default>
    load create:rt "D:\temp" "D:\Backup_Monday"
    sync create-empty mirror:left->right

    While Tuesday would load the Tuesday destination folder. The task would then be scheduled to run weekly: the Monday task runs once a week on Mondays.
    Aaron P Scooter Software

    Comment

    • karthikkumar
      New User
      • Jul 2015
      • 2

      #3
      Create New Folder Script

      Dear Sir,

      Can we create folder with end number 1, 2, 3, 4, 5, 6, 7 and then back to this sequence to overwrite? May be dividing the number by 7?. Kindly help us to proceed further as soon as possible.

      Thanks & Regards.



      Originally posted by Aaron
      Hello,

      Beyond Compare scripting does not have a variable for the weekday name. The two variables supported in script are the full date (%date%) and time (%fn_time%).

      To achieve what you are looking for, I would suggest setting up 7 Windows Scheduled Tasks. Each would call a different, but almost equal, script file. The Monday script would call ScriptMonday.txt:
      option confirm:yes-to-all
      load <default>
      load create:rt "D:\temp" "D:\Backup_Monday"
      sync create-empty mirror:left->right

      While Tuesday would load the Tuesday destination folder. The task would then be scheduled to run weekly: the Monday task runs once a week on Mondays.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16017

        #4
        We do not have internal script variables for these naming conventions, but you can pass any arbitrary text on the command line. This could be "Monday" or "7"

        Using: bcompare.exe "@c:\bcscript.txt" "Monday"

        option confirm:yes-to-all
        load <default>
        load create:rt "D:\temp" "D:\Backup_%1"
        sync create-empty mirror:left->right

        This is the same basic strategy as before, but you would use 1 script with 7 different Windows Scheduled Tasks, each with a slightly different command line parameter. Each task would run on the respective day, once a week.
        Aaron P Scooter Software

        Comment

        Working...