Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Rename files with batch file
Closed Thread
Old 10-16-2006, 06:03 PM   #1 (permalink)
 
Super Techie

Join Date: Sep 2005

Posts: 341

hillbillybob

Default Rename files with batch file

Hello,

Have a question. Has anyone attempted to automate the renaming of a file using the Date environment variable. In essence what I am trying to do is take

filename.dat

and rename it to

filename%date%.dat

%date% adds a bunch of slashes to it and other charecters that don't allow you to put it in as is. I would like this to be automatic, I can set the file name, because it will be the same everytime, just want to rename it.

thanks
__________________
The greatest measure of a nation is not it\'s army or economy, but by how many people are trying to get in, and how many people are staying!!
Guns, Guts, and Alcohol made America free.
Born American, Die American
Ubuntu - it\'s all about the bun\'s baby!!!
hillbillybob is offline  
Old 10-16-2006, 07:51 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default

save attached file and rename as exe

have the batch file call the program

Last edited by office politics; 02-01-2009 at 03:06 PM.
office politics is offline  
Old 10-17-2006, 10:55 AM   #3 (permalink)
 
Super Techie

Join Date: Sep 2005

Posts: 341

hillbillybob

Default

Pimp, beutiful. thanks
__________________
The greatest measure of a nation is not it\'s army or economy, but by how many people are trying to get in, and how many people are staying!!
Guns, Guts, and Alcohol made America free.
Born American, Die American
Ubuntu - it\'s all about the bun\'s baby!!!
hillbillybob is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On