Change:
assert.strictEqual(result, '9007199254740992.test.1.js'); }); <ins> test('Increment file name with just version and no extension', function () { const name = '001004'; const result = incrementFileName(name, false, 'smart'); assert.strictEqual(result, '001005'); }); test('Increment file name with just version and no extension, too big number', function () { const name = '9007199254740992'; const result = incrementFileName(name, false, 'smart'); assert.strictEqual(result, '9007199254740992.1'); }); test('Increment file name with no extension and no version', function () { const name = 'file'; const result = incrementFileName(name, false, 'smart'); assert.strictEqual(result, 'file1'); }); test('Increment file name with no extension', function () { const name = 'file1'; const result = incrementFileName(name, false, 'smart'); assert.strictEqual(result, 'file2'); }); test('Increment file name with no extension, too big number', function () { const name = 'file9007199254740992'; const result = incrementFileName(name, false, 'smart'); assert.strictEqual(result, 'file9007199254740992.1'); }); </ins> test('Increment folder name with prefix version', function () { const name = '1.test'; const result = incrementFileName(name, true, 'smart');

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --Version: 1.52.1 Commit: Date: 2020-12-16T16:30:02.420Z Electron: 9.3.5 Chrome: 83.0.4103.122 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 20.2.0 Steps to Reproduce: a file called in the explorer. that file. that file. new file name is , where it should be . <img width="220" alt="Screenshot 2021-01-05 at 11 08 23" src="https://user-"<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.485 --- <!-- score: 0.474 --<!-- potentialduplicatescomment --
I think the code is in Last time I checked there was also no test case for that.
Thanks. I acknowledge the issue. And we would welcome a PR that neatly fixes this and adds a test, thus adding help wanted label.
Not a Typescript magician here, otherwise I would have provided a pull request.
I can submit a PR. looking at the file/folder checks it looks like these two sets should be . If they look right, I will send a PR for them. File without extension - Version number only, without extension =
makes sense. Make sure to cover with tests and no need to go too fancy! Thanks
One other incrementing that I am not sure about. becomes , without the leading 0. Is this right, or should it maintain the number of leading 0s?
If you have zero leading paddings it usually means the amount of characters should be maintained. So making out of 0999 would be wrong IMO. It should just become 1000. Me two cents.

I agree with
it would be great if you can try this out with vscode insdiers from tomorrow and give us feedback. Thanks to for providing a PR
Will there be a release or how do I get my hands on the right version to test locally?
releases every day. Just get the release tomorrow and you should be good.
Tested the latest insider build. I could not break it. Works for me. Thanks a lot for the contribution.
Thanks for letting us know. Adding verified label.