vbscript - Copy File Over, then rename VBS -
so, had user me out in getting file renamed, fantastic!
here code:
set fso = wscript.createobject("scripting.filesystemobject") set fol = fso.getfolder("f:\downloads") each fil in fol.files 'may need specify comparison if instr(1, fil.name, "tv show bob - 13", vbtextcompare) <> 0 ext = fso.getextensionname(fil) if len(ext) > 0 ext = "." & ext sname = "tv show bob s03e13" & ext fil.name = sname end if next wscript.echo "completed!"
but issue come across file being used torrent program. right now, standard files use line of code:
if (objfso.fileexists("d:\tv shows\tv\tv show s01e02.mkv")) else objfso.copyfile "d:\downloads\tv show - 02 [1080p].mkv", "d:\tv shows\tv\tv show s01e02.mkv" end if
i wondering if possible have copy file, paste renamed version using first section of code. :d
Comments
Post a Comment