Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 12

112.111.x.x forum
119.63.x.x forum
175.44.x.x forum
175.44.x.x forum
175.44.x.x forum
178.255.x.x news
183.60.x.x forum
184.73.x.x forum
192.151.x.x forum
222.77.x.x forum
61.241.x.x forum
66.249.x.x dilbertplus

Last Seen

Hostprofil Thu 13:15
Wussie Thu 12:43
Rich Thu 12:14
Dodgeitorelse Thu 07:32
BYTM Thu 06:05

Newest Members

Forums
VBScript To Rename Map Images
Rich
Thu Feb 07 2008, 02:38PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

For those who have lots of map images, and dont want to rename them manually to the new standard, here is a vbscript I made to do it automatically.

USE WITH CAUTION OTHERWISE YOU COULD RENAME ALL YOUR COMPUTER FILES

It goes recursively into folders, so make sure set the folder name in the last few lines correctly, pointing to a seperate folder with the images, and not the root of your computer.

I TAKE NO RESPOSIBILITY FOR THIS SCRIPT SCREWING UP YOUR COMPUTER - YOU HAVE BEEN WARNED

http://www.greycube.com/help/lgsl_rename_images.vbs.txt
Website
HTM|Minion
Tue Mar 04 2008, 09:19PM

Posts: 25
Joined: Fri Feb 22 2008, 01:20PM
Registered Member #3734
Question, I have my images placed in F:\2k4images I created the vb script and placed it in my "F" directory with the folder path "list_files("2k4images")". upon running the script I get a popup window that says "done", but my images are not renamed. What am I doing wrong?
Website
Rich
Wed Mar 05 2008, 04:05AM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

Try including the drive letter, list_files("F:\2k4images")
Website
HTM|Minion
Wed Mar 05 2008, 09:22AM

Posts: 25
Joined: Fri Feb 22 2008, 01:20PM
Registered Member #3734
Same result with "list_files("F:\2k4images")" Rich, "Done" pops up, but the file names remain unchanged.

Do they need to be on the main drive? Is there any other program I need to have installed maybe?
Website
Rich
Wed Mar 05 2008, 12:57PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

Ive re-written the code properly, so it also replaces more than just spaces to match what lgsl v4 expects.

Give it ago
Website
HTM|Minion
Wed Mar 05 2008, 02:36PM

Posts: 25
Joined: Fri Feb 22 2008, 01:20PM
Registered Member #3734
Ok.. I set it up as "sImageFolder = "F:\2k4images"" now I get a new error:

Website
HTM|Minion
Wed Mar 05 2008, 03:17PM

Posts: 25
Joined: Fri Feb 22 2008, 01:20PM
Registered Member #3734
Weird...I went back to the folder and they seem to be renamed! Uploading now to test.
Website
Rich
Wed Mar 05 2008, 03:27PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

Ah, its trying to rename a map, but there is already a file with that name.

Have updated the script to check the name does not already exists.

It may have only got halfway through the list, so run the new version again to make sure they have all been renamed.
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org