? is a special character.
the following code renames the file but just a small hick up on results:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Folder'}...
jfdabiri, the code can rename a file alright but...
from the scenario i gave...this file changes the name with every new date...so it would not give the expected results.
I did some research and landed on using regular expressions in VBS. as this would replace the string LOA with the string...
dm4ever, your code would work only if the filename wasnt changing. but in this scenario it changes depending on the date flag the file is given by the process.
PHV, do i run this code as a batch file. When i do,
there is no difference as i think what happens is that it
counts from the 4th...
Hi i am not a programmer but this site has been very helpful to me.
I need to rename a file that is created by a process called end of day.
The file is as follows after creation
LOA070402.zip
where 07-year, 04-month, 02- date.
So the date flag changes by each day...
The file should then be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.