Can any one tell me how can i change extension "*.X" to "*.Y" in a given directory
Below is the Picture of what i mean :-
Thankx in Advance
Below is the Picture of what i mean :-
Thankx in Advance
Can any one tell me how can i change extension "*.X" to "*.Y" in a given directory
Below is the Picture of what i mean :-
Thankx in Advance
Just make a program that does a read write thing.
Or give up on windows and become a real programmer.
In other words..learn hex.
You would have to go through the folder with FindFirstFile/FindNextFile and pick out the files with the extension then rename them using SHFileOperation. At least that's how I would tackle the problem, there may be another way but I don't know it.
Can u give me the required source code or a tutorial or atleast brief information??
Thankx
Thankx
Can u give me the required source code or a tutorial or atleast brief information??
Thankx
God NaN................................. I cannot believe you are asking such a question.
Numbers are static.
Integer relations?
If this "." is the zero point for logic then it is pretty simple isnt it.
What were those old ASCII codes and why were they chosen?
This algorithm isn't tested for what your doing but it should be pretty close, it's from a recursing thingy I wrote a while back. It requires a pointer to a path passed in SearchPath without the final "\" and a pointer to the extension in the format "*.EXT" I haven't worked the SHFileOperation into it, check your docs for that.
FileRename proc SearchPath:DWORD,Extension:DWORD
LOCAL fhandle :DWORD
LOCAL FileData :WIN32_FIND_DATA
LOCAL FindFlag :BYTE
LOCAL FileName[MAX_PATH] :BYTE
LOCAL fFileBuffer{MAX_PATH] :BYTE
invoke StrLen,SearchPath
mov edi,SearchPath
add edi,eax
mov [edi],BYTE PTR "\"
mov [edi+1],BYTE PTR 0
invoke lstrcpy,ADDR FileName,SearchPath
invoke lstrcat,ADDR FileName,Extension
invoke FindFirstFile,ADDR FileName,ADDR FileData
mov fhandle,eax
.IF fhandle != -1
.repeat
mov eax,FileData.dwFileAttributes
and eax,FILE_ATTRIBUTE_DIRECTORY
.if eax == NULL
invoke lstrcpy,ADDR fFileBuffer,SearchPath
invoke lstrcat,ADDR fFileBuffer,ADDR FileData.cFileName
;################
; The variable fFileBuffer contains path and filename
;
; Do your SHFileOperation here
;################
.endif
invoke FindNextFile,fhandle,ADDR FileData
mov FindFlag,al
.until FindFlag == 0
invoke FindClose,fhandle
.ENDIF
ret
FileRename Endp
God NaN................................. I cannot believe you are asking such a question.
... its not nan
NaN!=Gollum :)
lol :grin:
Am I the only one that thinks that telophase should change his avatar? Maybe not a stolen one the next time. :grin:
Seemed like some people look at the avatar and not the name :grin:
I think on his first post with the avatar I asked him if he was related to NaN, there is a startling family resemblance, they're almost twins :grin:
BTW NaN has changed back to Shrek
I guess there's no danger of anyone stealing mine though so I don't mind.
BTW NaN has changed back to Shrek
I guess there's no danger of anyone stealing mine though so I don't mind.
Maybe,there is a genetic transfer that we don't know. :)