Change Json number format - Visual studio code

Shaun Mic 1 Reputation point
2022-01-25T06:02:09.43+00:00

when i create json files(100 files) in visual studio it's starting from 1-100. however, i want to start file number format from 201-300, 301-400 like that. how can i change the json number format in visual studio code?

Developer technologies VB
{count} votes

1 answer

Sort by: Most helpful
  1. LesHay 7,141 Reputation points
    2022-01-25T08:18:44.867+00:00

    Hi

    Are you talking about the file names such as File1.json, File2.json etc ..............
    If so then check this out (this is an over simplified example)

            ' start file numbering at:
            Dim filenumb As Integer = 200
    
            ' folder name (path)
            Dim path As String = IO.Path.Combine(Application.StartupPath, "MyPath")
    
            ' folder doesn't exist then create it
            If Not IO.Directory.Exists(path) Then IO.Directory.CreateDirectory(path)
    
            Dim filename As String = IO.Path.Combine(path, "File" & filenumb.ToString & ".json")
            ' filename = File200.json
    
            filenumb += 1
    
            filename = IO.Path.Combine(path, "File" & filenumb.ToString & ".json")
            ' filename = File201.json
    
            filenumb += 1
    
            filename = IO.Path.Combine(path, "File" & filenumb.ToString & ".json")
            ' filename = File202.json
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.