Prev: Starting a 64bit program from a 32bit .HTA?
Next: Copy file from one directory to a new directory, using excel spreadsheet as reference for items to be copied
From: Evertjan. on 18 Dec 2009 15:36 Dave "Crash" Dummy wrote on 18 dec 2009 in microsoft.public.scripting.vbscript: > > I adopted my script from another application, and there > > was some reason (which I forget) that I couldn't do it directly. > > Ah! Now I remember! I didn't want to change the name, exactly, I wanted > to change the case. I can't do that directly because VBS doesn't > distinguish case in file names. For example, if I try to change "_STD" > to "_std," > > This won't work: > file.name = replace(file.name, "_STD","_std") this will, methinks: file.name = replace(file.name, "_STD", "_stdTMPtmp") file.name = replace(file.name, "_stdTMPtmp", "_std") > This will: > dname=replace(file.path,"_STD","_std") > file.move dname > -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) |