bat change the date one year
Moderator: DosItHelp
-
- Posts: 7
- Joined: 15 Oct 2014 23:49
- Location: italy
- Contact:
bat change the date one year
hi, I just joined this forum queso and my first post, I am a php programmer, I do not know much about m-dos, should I create a bat file that when launched I change the date of the calendar year but only ess: date * / * / 2013
Re: bat change the date one year
To get an exact answer you need to provide the actual situation which needs to be edited or modified.
A batch file can change a string, but the way it is being changed and the makeup of the string is important.
A batch file can change a string, but the way it is being changed and the makeup of the string is important.
-
- Posts: 7
- Joined: 15 Oct 2014 23:49
- Location: italy
- Contact:
Re: bat change the date one year
then I try to do all that and a script dos, that when opened, will change the system date but only one year, not the day, to change just one year
Re: bat change the date one year
The date command does that at the command prompt.
Type date /? for help.
Type date /? for help.
Re: bat change the date one year
facescreen wrote:I do not know much about m-dos,
Good thing. Shouldn't be using MS-DOS anymore anyways.
-
- Posts: 7
- Joined: 15 Oct 2014 23:49
- Location: italy
- Contact:
Re: bat change the date one year
then perhaps I can not explain I can relate if at least I can understand I do not speak English well?
everything I have asked for and if there is a way to change only the date of the calendar year but only without the days or months, ess: if I write (date 01/01/2015) changes the date 01/01/2015 in the calendar, is there a way to change just one year without the day and the month? like so: (date %%/%%/2013)

Re: bat change the date one year
Code: Select all
@echo off
set year=2015
for /f "tokens=1,2 delims=.-/" %%i in ("%date%") do date %%i/%%j/%year%
exit /b
Run as administrator.
-
- Posts: 7
- Joined: 15 Oct 2014 23:49
- Location: italy
- Contact:
Re: bat change the date one year
Yuri with 1000
you very god ms-dos






Re: bat change the date one year
facescreen wrote:Yuri with 1000![]()
![]()
![]()
![]()
![]()
you very god ms-dos
Incorrect. He is very good with batch files.
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: bat change the date one year
Squashman wrote:facescreen wrote:Yuri with 1000![]()
![]()
![]()
![]()
![]()
you very god ms-dos
Incorrect. He is very good with batch files.
You're going to confuse the poor guy.
I feel like somebody should explain to Oleg that there's a difference between MS-DOS and the modern Windows command line. MS-DOS is an operating system that's very rarely used anymore and its command line is command.com, which is a 16-bit program that has limited scripting capabilities compared to the modern command line. The modern command line is cmd.exe, which is a 32-bit program.