Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
Posts
78
VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
Hey Friends !!!!!!!!!!!!!!!!!
Dis is the first time I have posted to the Codebank,, AND my tiny contribution dis time is to add or remove Extensions (Additional) to ALL the files in a Folder. I have also attached a file to remove any Extension added by this tool or otherwise also. I didn't find it necessary to comment in each and every step,so there are almost NO comments.
Please feel free to comment and suggestions ARE welcome!!!!!!!!!!!
thanx
wiz....
Last edited by wiz....; Dec 30th, 2008 at 03:19 AM.
Reason: Forgot to add VB6 in the subject!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional........... WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
Posts
78
Re: VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
I would want to do this ...for eg. I have 100 jpg images in a folder and i want to convert all of them to .gif ....... I use this to do so.........(in this case it allows us to convert jpg directly to gif)............and secondly I am trying to develop a program which hides the files in af folder...so I kind of use this cde in that....so I thought it may be useful.
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional........... WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
Re: VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
Originally Posted by wiz....
I would want to do this ...for eg. I have 100 jpg images in a folder and i want to convert all of them to .gif ....... I use this to do so.........(in this case it allows us to convert jpg directly to gif)............and secondly I am trying to develop a program which hides the files in af folder...so I kind of use this cde in that....so I thought it may be useful.
But changing a file names extension from .JPG to .GIF doesn't actually convert it into a different format, it's still a JPEG no matter what you call it!
And if you are converting them you would first create the GIF file before you start messing with the original files.
Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
Posts
78
Re: VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
hey Edgemeal!!!!! i've tried it many times and it works....itsn ot necessary that you first have to create the GIF file. Another eg. My mobile doesn't support JPG pictures......but gif are acceptable .....the pictures I converted using this code WORK fine dere......... so it works for me!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional........... WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
Re: VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
It does not work - the program is capable of loading both types of pictures, and luckily ignores the extension (which is what has fooled you into thinking it works).
What determines how a file can be loaded is not the extension (which is basically just an indicator for which program should try to load it), but the contents of the file. If you open a picture file in Notepad, no matter what the file extension has been changed to, you will see that the first few characters of a Jpeg file are JFIF, and a GIF file starts with something like yoya.
It seems that JPG pictures are fine for your mobile, but for some reason it doesn't like the extension you had. There are several extensions that are apt for JPeg pictures (including .JPG, .JPEG, .JFIF), so try another one.
Re: VB6 - ADD and REMOVE EXTENSIONs TO ALL FILES In A FOLDER
Totally, 100% plus, agree with si_the_geek & edgemeal. Renaming a file's extensions does not convert anything.
As for a reason to rename extensions? I can think of one that I have used in the past. Let's say I have a text parser/reader that only supports specific file extensions. If I have ascii files with extensions of .xyz that must be changed to .txt for that app to work right, then a project like yours could be useful. In the past, I'd simply use a command prompt and rename the files. I found that easier than writing a script or project.
Insomnia is just a byproduct of, "It can't be done"