Get numeric name of current folder, add 1 to it?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Dougmeister
Posts: 1
Joined: 10 Dec 2019 08:49

Get numeric name of current folder, add 1 to it?

#1 Post by Dougmeister » 10 Dec 2019 08:51

I have a folder for each day of the month and make changes to one file. I then need to manually copy it to the next day.

I.e., I am in folder "10". Once I'm done changing file X.txt, I need to copy it to "..\11\X.txt".

I'm sure this can be done in a batch file but I'm not sure how. Any ideas?

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Get numeric name of current folder, add 1 to it?

#2 Post by aGerman » 10 Dec 2019 11:07

Say, today is Dec., 31st 2019. How does the path look like for tomorrow? And are zeros prepended to one-digit months and days?

Steffen

Post Reply