Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Batch file required - date

Thread Tools
 
Search this Thread
 
Old 25 November 2002, 10:48 AM
  #1  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

Anyone have a batch file or know the variable to create a directory of todays date.

Basically I want a batch file to create a folder of todays date. Then move all files from todays date to todays folder.

I want it to run everyday, and thus create/move files to the right folder.

Anyone?
Old 25 November 2002, 11:39 AM
  #2  
ADP
Scooby Regular
 
ADP's Avatar
 
Join Date: Apr 2001
Posts: 3,823
Likes: 0
Received 1 Like on 1 Post
Post

Is this any use:

rem This puts the date into some enviroment variables.
echo Calculate the date
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set DayOfWeek=%%i
set Month=%%k
set Day=%%j
set Year=%%l
set Date=%%i %%j/%%k/%%l
)

rem This puts the time into some enviroment variables.
echo Calculate the time
for /F "tokens=1-2 delims=: " %%i in ('time /t') do (
set Hour=%%i
set Minute=%%j
)
Old 25 November 2002, 11:40 AM
  #3  
555guy
Scooby Newbie
 
555guy's Avatar
 
Join Date: Nov 2002
Posts: 16
Likes: 0
Received 0 Likes on 0 Posts
Lightbulb

If your trying to do this via VB then I have a piece of code that will dot he job for you

[Edited by 555guy - 11/25/2002 11:40:54 AM]
Old 25 November 2002, 11:49 AM
  #4  
GaryK
Scooby Regular
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Post

easiest way is to pipe it out and then back in again:

@echo off
echo md "%date%" > test2.bat
call test2

HTH

Gary

Old 25 November 2002, 02:03 PM
  #5  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

christian...

I can do you it a service if you want

Not today though.

David
Old 25 November 2002, 04:33 PM
  #6  
ids
Scooby Regular
 
ids's Avatar
 
Join Date: May 1999
Posts: 424
Likes: 0
Received 0 Likes on 0 Posts
Post

Used to use a utility called FDATE - have a google... very useful for that and more

If you cant find it mail me and I can send it u with some example scripts...

Ids
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
Frizzle-Dee
Essex Subaru Owners Club
13
09 March 2019 07:35 PM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
yabbadoo4
ScoobyNet General
11
30 September 2015 10:33 PM
Nick_Cat
Computer & Technology Related
2
26 September 2015 08:00 AM



Quick Reply: Batch file required - date



All times are GMT +1. The time now is 02:39 AM.