Login | |
|
 |
RE: I need to rename a file adding a "."dot b... - 1/9/2008 9:04:29 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
As an example: strOldName = "IF232PMSYYYYMMDDHHMMSS.V" strNewName = Left(strOldName, 8) & "." & Mid(strOldName, 9, 14) & ".dat" WScript.Echo strNewName
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: I need to rename a file adding a "."dot b... - 1/9/2008 10:32:38 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
Another example: strOldName = "IF232PMSYYYYMMDDHHMMSS.V" strNewName = Replace(Replace(strOldName, "YYYY" ,".YYYY"), ".V", ".DAT") Decide yourself wether it's better to modify a certain patern (like "YYYY") as in my example or to modify/insert characters at a certain position as in ebgreen's exa;ple.
_____________________________
Fred
|
|
| |
|
|
|
|
|