Skip to content

Vbscript Rename A File With Date Software

Posted on by admin
How to rename a file

See More On Stackoverflow

WithRename a file linux

Please post your code, as bad or as little as it is, it really helps, the FormatDateTime takes your locals in account, i'm in Flanders, Europe so my system adds 19062012.ext but on your system it should be 06192012.ext set oFso = createobject('scripting.filesystemobject') sDirectorypath = 'c: testing' renamefiles(sDirectorypath) sub renamefiles(folder) set oFolder = oFso.getfolder(folder) for each oFile in oFolder.files newname = oFile & ' & replace(FormatDateTime(now,2),'/',') & '.' & oFso.GetExtensionName(oFile) wscript.echo 'renaming ' & oFile & ' = ' & newname errResult = oFso.MoveFile(oFile, newname) next for each oSubFolder in oFolder.subfolders renamefiles(oSubFolder) next end sub.

Quickly rename files with this script. Pro engineer wildfire 5.0 32 bit. As you can see, the Rename Files script is far superior to the file renaming methods that Windows and DOS provide.