|
#1
|
||||
|
||||
|
Need some help again,
How would I rename a file to the current date and time it was renamed? Example: date = current date (ex. 11272007) time = current time (ex. 0325AM) File.Rename("C:\\Temp\\filename.txt", "C:\\Temp\\filename_date_time.txt"); So, the new file name will look like below: filename_11272007_0325AM.txt Anybody? Thanks in advanced... ![]() yhb) |
|
#2
|
||||
|
||||
|
Simple enough:
date = current date (ex. 11272007) time = current time (ex. 0325AM) File.Rename("C:\\Temp\\filename.txt", "C:\\Temp\\filename_"..date.."_"..time..".txt" ); Good luck Yossi |
|
#3
|
||||
|
||||
|
but isn't that only will picked up what i have in my date and time? not the actual date and time it was renamed? :(
yhb) |
|
#4
|
||||
|
||||
|
If you use the System.GetTime and System.GetDate actions, you are getting these values in realtime. Then when you rename the file , using your variables, the file will be renamed accordingly.
Yossi |
|
#5
|
||||
|
||||
|
I got your point...
Thanks much...yhb) |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best way to share custom buttons with the group? | mwreyf1 | AutoPlay Media Studio 6.0 | 10 | 09-03-2009 05:01 AM |
| http://yourfilelink.com - 50MB max upload, free! | Intrigued | General Chat | 14 | 09-26-2006 09:44 AM |
| Function: Compare File Date to ISO Date | Lorne | AutoPlay Media Studio 5.0 Examples | 0 | 05-10-2004 06:35 PM |
| HOWTO: Make an AutoPlay Application Expire | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-09-2002 11:10 AM |
| Install only into one of several directories with specific existing file? | RichardShaw | Setup Factory 5.0 | 0 | 08-17-2000 03:29 PM |
All times are GMT -6. The time now is 04:41 AM.







How would I rename a file to the current date and time it was renamed? 
Linear Mode

