|
-
May 27th, 2004, 01:27 PM
#1
Thread Starter
Lively Member
Prob with big file renaming
I use this function to rename file :
System.IO.File.Move(Filename1, Filename2)
It work fine with small file like 5 or 6 mb, but when I try to use it on big MP3 album like 100mb it cause an error out of memory.
(PS : I have 1024 mb of RAM)
Thanks
-
May 27th, 2004, 08:40 PM
#2
Fanatic Member
Couple things I can think of. Maybe your virtual memory (page file) size is set to low. Or possibly the temp directory is to full, I know that on NT4 I've had problems with the temp directory "filling up".
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
May 28th, 2004, 04:15 AM
#3
Thread Starter
Lively Member
The prob doesn't come from there. And anyway it should be another way to rename a file that recopying him cause even if it's work with 80 90 mb file it ta ke long time. When U rename a file with windows right click, it just modify the name it took 1 sec.
There is a function officially classed as VB .NET funtion on msdn
here but when I try it like :
rename (oldfile, newfile)
it say too much argument for private sub rename :/
Thans if someoen can tell me another way
Last edited by choas; May 28th, 2004 at 04:33 AM.
-
May 28th, 2004, 04:33 AM
#4
Hyperactive Member
Why don't you use the?
Rename(OldName, NewName)
Where NewName has the same path but just a different file name
-
May 28th, 2004, 04:36 AM
#5
Thread Starter
Lively Member
It seem you posted your reply at th same time I was editing mine lol
As I told just over this function doesn't work
-
May 28th, 2004, 04:40 AM
#6
Hyperactive Member
It might help if you posted the code that doesn't work. I've used 'Rename' without any problems.
-
May 28th, 2004, 04:43 AM
#7
Thread Starter
Lively Member
VB Code:
Dim oldname, newname As String
oldname = x.Filename
newname = x.get_TTAG("TPE1") & " - " & x.get_TTAG("TIT2") & ".mp3"
Rename(oldname, newname)
-
May 28th, 2004, 08:20 AM
#8
Thread Starter
Lively Member
Hmm sorry about the rename function it's my fault I have forgot I have already a function named Rename in my prog :/
The function work but it's still crashing when trying to rename large file (over 100mb). Which method is using widows to rename file in a seconde ?
Please I really need help to solve this
-
May 28th, 2004, 05:25 PM
#9
Hi.
This might be a little overkill, but if NET can't handle it, maybe it time to look at API . Try looking at SHFileoperation in the help.
I believe that is the one explorer uses.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|