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.

Copy a txt file and rename it to current date?

Thread Tools
 
Search this Thread
 
Old 27 June 2003, 01:42 PM
  #1  
Avi
Scooby Regular
Thread Starter
 
Avi's Avatar
 
Join Date: Apr 2001
Location: Manchester
Posts: 5,084
Likes: 0
Received 0 Likes on 0 Posts
Post

Need to write a batch file to copy a txt file to a directory and rename it to the current date,

anyone knock one up, or tell me the commands.

Cheers

Andy
Old 27 June 2003, 05:12 PM
  #2  
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

@echo off
FOR /F "tokens=2-4 delims=/ " %%i in ('DATE /T') do set fdate=%%k_%%j_%%i
Copy p:\test.txt p:\%fdate%.txt
Old 27 June 2003, 05:49 PM
  #3  
rik1471
Scooby Regular
 
rik1471's Avatar
 
Join Date: Nov 2001
Posts: 4,788
Likes: 0
Received 0 Likes on 0 Posts
Post

for /F "tokens=1,2,3,4 delims=/ " %%A in ('date/t') do set d=%%A-%%B-%%C-%%D

copy TEXT.txt PATH\%d%.txt

[Edited by rik1471 - 6/27/2003 5:49:22 PM]
Old 27 June 2003, 05:59 PM
  #4  
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

looks just like mine
Old 27 June 2003, 07:31 PM
  #5  
Jeff Wiltshire
Scooby Regular
 
Jeff Wiltshire's Avatar
 
Join Date: Nov 2000
Location: 412 Wheel HP Audi RS4
Posts: 2,021
Likes: 0
Received 1 Like on 1 Post
Post

@echo off
FOR /F "tokens=2-4 delims=/ " %%i in ('DATE /T') do set fdate=%%k_%%j_%%i
Copy p:\test.txt p:\%fdate%.txt
Old 27 June 2003, 07:32 PM
  #6  
Jeff Wiltshire
Scooby Regular
 
Jeff Wiltshire's Avatar
 
Join Date: Nov 2000
Location: 412 Wheel HP Audi RS4
Posts: 2,021
Likes: 0
Received 1 Like on 1 Post
Wink

Um dee dum dee dum
Old 27 June 2003, 07:54 PM
  #7  
Avi
Scooby Regular
Thread Starter
 
Avi's Avatar
 
Join Date: Apr 2001
Location: Manchester
Posts: 5,084
Likes: 0
Received 0 Likes on 0 Posts
Post

Cheers All
Old 27 June 2003, 09:45 PM
  #8  
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
Talking

lol @ Jeff..

David
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
SilverM3
ScoobyNet General
8
24 February 2021 01:03 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM



Quick Reply: Copy a txt file and rename it to current date?



All times are GMT +1. The time now is 01:38 AM.