Hi Guitarzan,
Thanks very much for this. I still don't understand how it stops the leading zero after E10 (i thought it would simply go E010...) but it works a treat. I will now look into the dictionary object as per your other comment to scan the files first then rename from the array...
Dear all,
Please note that in the sample script above, i was focusing on making any filename changes to the first 9 files. Therefore, replacing "good" with "test" is merely an example.
Dear all,
This thread is related to another thread i have just posted (For Each command skipping over some files), but refers to a different problem. For convenience, i have created two separate scripts with the aim of embedding elements of this script below to the main script in the first...
Dear all,
I have developed a simple script to rename the filename of a video file according to the TV show name, Season No., Episode number and file extension. The script then renames all files in the directory and increments the episode number by one. For example, the first video is renamed...
I've figured out the problem! When the program is checking to see if the filename.avi exists in the root folder, it does not check subfolders. Is there a way how to improve to code so as to allow this?
Hi Geates,
Thanks so much for your help, and especially providing some code. I'm not sure whether i'm missing something, but even after i declare the variables, the code doesn't seem to do anything. For example, i create some test folders on my desktop, create a list.txt file and then execute...
Hi,
I have developed a script that lists all the files in a folder (and subfolders) and writes the filename to a text file. For example, if filename.avi is in a folder c:\test\movie\filename.avi then the script will create a text file (and located as a destination directory) and on the first...
Guys,
Another problem i need your help with! I tested the code at work today, moving some text files around and it worked well, without any problems. However, at home i am trying to move some movie files (movie.avi) onto a network drive and at line 18 newfolder.Move(destination), i receive a...
It's all fixed - it was a simple matter of ensuring i did not call a variable before i actually stored data in it.
Final code:
---------------------------
dim objFSO, objFolder, b, c, newfolder
dim colFiles, source, destination
source = "C:\Test\"
destination = "C:\Test1\"
Set objFSO =...
Thanks for this PHV. The last thing i'm trying to do is to move the newly created folder (with file inside) to a different directory. This seems very basic to do however, i get an error reporting 'Path Not Found'. I'm not sure whether it is because of the '\', but i want the program to move all...
Hi all,
Appreciate your comments. The problem is that i'm trying to create a folder with the same name as the filename, but created in a particular destination.
Using the updated code, the folder is always created on the desktop and not in "C:\test\".
-------------------------
dim objFSO...
Hi,
I am trying to create a folder based upon the base name of a filename. For example, if a file is named 'test.txt' then the program will create a folder called 'test'.
Additionally, the filename 'test.txt' shall be moved such that is become inside the folder 'test'. Also, the folder...
Thanks PHV for your quick reply.
After making your corrections, i receive an 800A003A 'File already exists' error message (i never got an error before, just didn't move files individually). Please note that an actual folder called Week 1 (c:\test\week 1\) already exists, but there are no files...
Hi,
I am very new to VB Scripts, and hence i already have a question to ask.
The code i have written is probably very innefficient, but what i am trying to do is compare the DateLastModified attributes of a collection of pictures that are in a folder, and then according to the number of days...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.