the goal is to have two variables: month=05 year=2013 with this variables the rest of the script is creating folders and files with the year and month of the previous month So, when I run this script today (June 2013) I want to write the folder: Folder1_abc_ 201305 Folder9_xyz_ 201305 I will try now...
@Aacini, thank you very much. works like a charm one other question. How can I simplify the same thing with the month? It is working as follows, but should be possible with 1-2 lines code instead of 12. set currentmonth=%date:~3,2% if "%currentmonth%" == "01" (set month=05) if &q...
Hi there I need to have a variable which contains the last year: set year=2012 Here is what I have tested so far. set currentyear=%date:~6,4% :CHANGE2LASTYEAR set /A %currentyear%-1 >%temp%\year.txt set /P year=<%temp%\year.txt Actualy this is working in a dos window, but not in a script. (set /a) s...