Copy a txt file and rename it to current date?
#1
Scooby Regular
Thread Starter
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
anyone knock one up, or tell me the commands.
Cheers
Andy
#2
Scooby Regular
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
@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
FOR /F "tokens=2-4 delims=/ " %%i in ('DATE /T') do set fdate=%%k_%%j_%%i
Copy p:\test.txt p:\%fdate%.txt
Trending Topics
Thread
Thread Starter
Forum
Replies
Last Post
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