How can I use the contents of a TXT document as the name of a new folder
For example, on my computer under d: there is a 123.txt, and its contents are 120304. How can I create a new folder
named 120304??
Help!!
'Post #10': A new problem: it can run in XP—but why can't it run in 2K? why?
@echo off
set /a tm1=%date:~0,4%
set /a tm2=%date:~5,2%
set /a tm3=%date:~8,2%
set /a number=%tm1%*10000+%tm2%*100+%tm3%
if not exist D:\beifen.txt echo %number%>D:\beifen.txt
Changed to BAT format. When run in XP it generates beifen.txt with the current date as the content. But in 2K the content becomes echo is off
So depressing
Also, %tm2% and so on are octal. When it gets to month 08 or 09, or day 08 or 09, it won't work.. how do I change it
What I originally wanted was to create a TXT document with the current date as its content, and have it run in 2K...
...help
[ Last edited by 9389381 on 2007-4-22 at 05:43 PM ]
For example, on my computer under d: there is a 123.txt, and its contents are 120304. How can I create a new folder
named 120304??
Help!!
'Post #10': A new problem: it can run in XP—but why can't it run in 2K? why?
@echo off
set /a tm1=%date:~0,4%
set /a tm2=%date:~5,2%
set /a tm3=%date:~8,2%
set /a number=%tm1%*10000+%tm2%*100+%tm3%
if not exist D:\beifen.txt echo %number%>D:\beifen.txt
Changed to BAT format. When run in XP it generates beifen.txt with the current date as the content. But in 2K the content becomes echo is off
So depressing
Also, %tm2% and so on are octal. When it gets to month 08 or 09, or day 08 or 09, it won't work.. how do I change it
What I originally wanted was to create a TXT document with the current date as its content, and have it run in 2K...
...help
[ Last edited by 9389381 on 2007-4-22 at 05:43 PM ]
