|
| ||||||||||
| Tags: append, bat file, datatime, rename |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Append Date-Time while Renaming files
Code: FOR %%V IN (%1) DO FOR /F "tokens=1-5 delims=/: " %%J IN ("%%~tV")
DO ECHO Rename "%%V" %%L%%J%%K_%%M%%N%%~xV |
|
#2
| ||||
| ||||
| Re: Append Date-Time while Renaming files
Hello, I am using one bat file which first make zip of the file and then rename it in mmddyy format. Just try it. Code: set mm= %Date:~3,2% set dd = %Date:~0,2% set yy = %Date:~8,2% pkzip -a AL%mm%dd%yy% *.doc |
|
#3
| ||||
| ||||
| Re: Append Date-Time while Renaming files
Hello, I have got one bite script which will work for you. Just use it. It will help you in this situation. For getting time stamp: Code: var str timestamp set $timestamp=gettime() Code: var str extension stex "[^.^l"$ $file >$extn Code: set $file = $file + $timestamp Code: set $file = $file + $extension |
|
#4
| ||||
| ||||
| Re: Append Date-Time while Renaming files
Hi, I have got the code which will append date and time while renaming it. Just try to make use of it, if you are getting it. I am not able to know how to use it? But if you got it, then reply me also. Code: Set date=%date:~10,4%%date:~4,2%%date:~7,2% FOR %%V IN (%1) DO Call :DoLoop :DoLoop set OFullFileName=%%V Set OFileExt=%FileName:~-4% Set OFileName=%OFullFileName:~0,-4% Set NFullFileName=%OFileName%%dat%%OFileExt% Rename %OFullFileName% %NFullFileName% Goto :EOF |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Append Date-Time while Renaming files" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error message: cant login This computer date/time is not synchornize with the date/time of network | fazalhassan | Networking & Security | 2 | 29-11-2011 08:29 AM |
| Need to append a sequential number to a date field in access | $Jaganmohini$ | Windows Software | 4 | 04-02-2011 06:39 PM |
| How can I append video files in powerpoint slides ? | Naotau | Windows Software | 3 | 26-11-2010 03:22 AM |
| Renaming files in Linux | Aileen_L | Operating Systems | 5 | 16-02-2010 03:27 PM |
| Renaming Music Files - working with ITunes Data Files | Tahseen Shahzad | Windows XP Support | 2 | 01-08-2009 12:54 AM |