Rename Files based on rolling files present.

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 weeks, 4 days ago.

  • Author
    Posts
  • #71659
    Profile photo of AASHU
    AASHU
    Participant

    I have multiple servers as Server1, Server2, Server3,........ServerN (N is a finite no)

    On Each server I need to search for a specific file File234.deg in specific location as \\ServerN\E$\Folder1(No Sub folder search is needed, search is restricted up to Folder1 only)

    If file is present I need to rename (rolling backup like *.deg01/*.deg02) the file (File234.deg) based on condition whether how many rolling files are already there. I need to create next rolling file. For Ex:

    1. If no rolling files are there rename File234.deg to File234.deg01

    2. If rolling files present are File234.deg01 and File234.deg02 then I should rename file to File234.deg03. There is a finite limit to the rolling files numbers too here.

    After taking the rolling backup I need to create a fresh empty file with the same name as before File234.deg in the same location

  • #71662
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    What does your code look like so far? is there a specific point at which you're stuck?

You must be logged in to reply to this topic.