424,287 Members | 2,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,287 IT Pros & Developers. It's quick & easy.

File renaming using VBScript

P: 3

I've created a simple batch file (as listed below) for renaming multiple files in the same directory:

Expand|Select|Wrap|Line Numbers
  2. @echo off
  4. SET old=EN
  5. SET new=_ENG
  6. for /f "tokens=*" %%f in ('dir /b *.890') do (
  7.   SET newname=%%f
  8.   SET newname=!newname:%old%=%new%!
  9.   move "%%f" "!newname!"
  10. )
As you can see the script only changes "EN" to "_ENG".
My problem is - I need this script to work in a network directory (not a local one) and the .bat script does not working in mine network environment.
I understood that there is a simple VBScript that does the same as mine .bat but also works in the network environment.

Thanks for your attention. I’m looking forward to your reply.
Feb 11 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.