1.

Solve : Create Directory with combined name?

Answer»

Hi,
What is the way to create a directory that its name is combined of the Computer Name and the excat time?
E.G:

Folder Name: TestPCSept1020081643
While the name is combined of:
Computer Name: TestPC
Date: Sept102008
Time: 16:43
Thanks!
md "C:\Location\to DIR\" "%computername%%date%%time%

TRY that.Thanks Carbon Dudeoxide
It creates on the same LEVEL of the batch file a folder with the PC name and Month-
and inside that, a folder with the day.
E.g:

Folder Name: 'PCTestSat 09'
and inside that folder, a folder called '13'All right...

set computername=%computername%%date%%time%
md "C:\Location\to dir\" "%computername%"
md "C:\Location\to dir\%computername%\" "13"

How does that work.It does the same thing:
Creates a folder and inside the folder there is another folder with the day.
;-(Oh right, HOLD on let me have a look. (I haven't tested it )Ahah!!! How foolish of me...

set computername=%computername%%date%%time%
md C:\Location\to dir\%computername%
md C:\Location\to dir\%computername%\13

Try That.



Discussion

No Comment Found