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

File renaming using VBScript

tsopr
P: 2
Hello,

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

Expand|Select|Wrap|Line Numbers
  1.  
  2. @echo off
  3. SETLOCAL ENABLEDELAYEDEXPANSION
  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. )
  11.  
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.
Miki
1 Week Ago #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.