moving files.
Author |
Message |
Saad85
|
Posted: Sun Mar 25, 2007 4:13 pm Post subject: moving files. |
|
|
okay, so right now, i've got a whole bunch of jpegs in one folder. is it possible to move all of them into folders that have the same name as them?
eg:
before:
c:/folder/1.jpg
c:/folder/2.jpg
c:/folder/3.jpg
..
c:/folder/500.jpg
after:
c:/folder/1/1.jpg
c:/folder/2/2.jpg
c:/folder/3/3.jpg
..
c:/folder/500/500.jpg |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Saad85
|
Posted: Sun Mar 25, 2007 6:40 pm Post subject: RE:moving files. |
|
|
nevermind, i can figure it out. |
|
|
|
|
 |
Saad85
|
Posted: Sun Mar 25, 2007 8:21 pm Post subject: RE:moving files. |
|
|
okay, apparently i can't figure it out.
what's wrong with this code? it should print out only the album names, but it prints out all the artists first then does some wierd stuff.
Turing: | var streamNumber : int
var stream2 : int
var fileName : string
var fileName2 : string
streamNumber := Dir.Open ("e:/music")
assert streamNumber > 0
var artist : array 1 .. 202 of string %array of artist
var album : array 1 .. 10 of string %array of albums (resets after each artist)
var i : int := 1
loop
fileName := Dir.Get (streamNumber )
exit when fileName = ""
artist (i ) := fileName %defines the array of artists
i + = 1
end loop
Dir.Close (streamNumber )
for j : 1 .. 202 %for each artist..
i:= 1
put "e:/music/"+artist (j ) %just to print out what the current directory is.
stream2 := Dir.Open ("e:/music/"+artist (j )) %opens that directory
assert stream2 > 0
loop
fileName2 := Dir.Get (stream2 ) %same as before
exit when fileName2 = ""
album (i ) := fileName2
put album (i )
i + = 1
end loop
Dir.Close (stream2 )
end for |
|
|
|
|
|
 |
rahzab
|
Posted: Thu Apr 05, 2007 4:00 pm Post subject: Re: moving files. |
|
|
i need help with turing I can't open music files. how do I run the program to open mp3's? Do i need the location of the file, if anybody knows could they write the program? |
|
|
|
|
 |
Clayton

|
Posted: Thu Apr 05, 2007 9:24 pm Post subject: RE:moving files. |
|
|
No, we cannot write the program for you. However, it is probably a good idea for you to look into the Music. module in Turing help, specifically Music.PlayFileReturn(), Music.Stop() and perhaps Music.PlayFileLoop().
By the way, Welcome to CompSci.ca  |
|
|
|
|
 |
|
|