123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|716|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> file and directory problems

Sun, 04 May 2008, 19:01
Orion Pax
Ok guys theoretically this bit of code SHOULD work. I cant see why anything WONT COPY. So far only EXE's will copy over. Now all the files are there. But when they are, they wont copy over. For example "ding.wav" wont copy over.



Wow...been a while since I posted in here....
Sun, 04 May 2008, 19:18
HoboBen
I don't have a copy of Blitz handy, but is the message for the .wav still printed onto the screen? (does it detect it's there properly)


-=-=-
blog | work | code | more code
Mon, 05 May 2008, 03:59
Orion Pax
The FIRST Print folder$ + file$ that shows up before the readdir loop was added just before this post to confirm that its reading the directory. The ones in the IF statements is ONLY printing the EXE's. So its reading it...just the filetype command is skipping it.
Mon, 05 May 2008, 06:09
Stealth
Those file commands in blitz are tricky.

Your code looks just fine to me. What throws me off is that if this works:



Then this should work, because it's the same exact code (minus the file extension).




Could you possibly provide the file names of the files your trying to copy (using the same case) to help recreate the problem?

-=-=-
Quit posting and try Google.
Mon, 05 May 2008, 06:29
Jayenkai
if Filetype(file$)=1 is checking if the file is in the Currentdir$() folder..
Should be if Filetype(folder$ + file$)=1

-=-=-
''Load, Next List!''
Mon, 05 May 2008, 12:00
JL235
Your also finding the last 3 digits and converting them to lower case, multiple times. This might be more efficient:


Although I would personally make a 'getExtension' function to find and return the extension for you, and also have it build in support for extensions of multiple lengths. Something like:


I have a feeling this could be more efficient, but hey it should work automatically with variable length extensions.
Mon, 05 May 2008, 14:39
Orion Pax
THATS WHY IT WONT WORK.....DUH! I will definitely use the getextension function. Thanks!