File I/O And Registry :: Getting An Alternative To The File.Copy Method Of Copying Files?

Mar 27, 2009

I've got an app which uses a background worker to copy files. It works fine but some files are quite large and it "appears" as though the app isn't doing anything. Is there an alternative to the File.Copy method of copying files so I can report on the progress of individual file copies, like the percentage complete?

View 19 Replies


ADVERTISEMENT

File I/O And Registry :: Copying Files From Storage Drives?

Jun 18, 2009

im looking for code to copy the files from the floppy drive to a removable drive on the computer.For example:

Copy A:contents to Z:contents

View 3 Replies

File I/O And Registry :: Copying Multiple Files From An Array?

Mar 28, 2011

I'm trying to copy multiple files from a directory, put them into an array, then copy just the 30 newest files(I haven't coded the 30 newest loop yet). I added a list box to the following code just to ensure the all the files are storing into the array properly... they are. When it try's to copy, it renames the first file to .log, then tells me that the .log file already exist. How do I get it to copy and keep the source file name in the destination folder Eventually I'll loop this and grab only 30 of the files.

Here's the code I'm playing with:
Private Sub transferButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles transferButton.Click

[code].....

View 2 Replies

Copying Large Files And Determining File Size Mid Copy?

Oct 31, 2011

I'm using "My.Computer.FileSystem.CopyDirectory(...)" to copy large directories (30-50gb) from one mapped share folder to another. Using "FileInfo.length" to add up all file and subfolder sizes, determines the 'origin directory' size just fine. However, if I use the same method for determining the size of the 'destination directory', mid copy, it returns the full file size, despite the copy not yet being complete.I'm at a loss as to why, as this method works fine in testing, going from a local PC t

Private Function FolderSize(ByVal dir As String) As Long
Dim Size As Long = 0
Dim d As New DirectoryInfo(dir)

[code].....

View 14 Replies

VS 2008 Displaying File Copy Progress (copying File 1 Out Of 10)

Aug 11, 2009

Here's my

[Code]...

During the file copy, Label2 isn't being updated. In fact, my whole form goes non-responsive. How can I fix this?

View 5 Replies

VS 2008 - File.Copy Basics - Copying A File

Dec 14, 2009

I cannot do the following:

File.Copy(Application.StartupPath & "wait.exe", "%APPDATA%WAIT.EXE")

Can someone remind me how I got about copying a file to that location?

View 1 Replies

VS 2008 File.Copy And Fast File Copying?

May 22, 2012

So, I have a task where I need to basically copy about 600,000 PDFs, some of which can be 5-6 MBs from one network fileshare to another network fileshare on another pc.Now, I crawled through the directories, sub-directories etc etc and created what I call a Filename/Filepath Database lookup table. This table contains the name and the unc fileshare path of each file which comes in handy.I have used Multi-threading and File.Copy to "copy" the files and I getting about 45K files per 4 hours which I need to be significantly faster then that and I am seeing performance degrade over time

View 1 Replies

System.io.file.copy() Not Copying File?

Jul 11, 2011

im trying to create a dialog allowing the user to change the image currently being displayed to something they choose.the error occurs when i hit the system.io.file.copy().heres the function.

This is the event that calls the function to copy the file - its works fine
Try
'get integer value of selected movie

[code]......

View 14 Replies

VS 2010 : Alternative Method For Getting File Type Description?

Nov 15, 2009

I am currently using the registry to get file descriptions for files. As an example, so that a DOCX file will return the description "Microsoft Word". I am doing this from the HKEY_CLASSES_ROOT registry key.However, registry access is extremely slow, and I need to do several thousands of these. Is there an alternative way to do this?

View 6 Replies

File I/O And Registry :: Load - Read - Locate & Copy Text In A File?

Aug 12, 2010

Before I begin I would like to mention that I am not a noob in VB, it's just I've never had to do anything this complex before. Basically what I want is to have a program that you can load a txt file in, have it copy key words, and paste it in a textbox so I can use it later on. So in this text file, there is a bunch of info, but I am only needing a certain part. Here is an example of a text file (actually a .dat file, but is easily read):

[Code]...

View 3 Replies

File I/O And Registry :: File Copy To Server Of Differnt Domain?

Apr 24, 2009

I have a program that I copy a file from one server to another. This has been working well if the servers are on the same domain.I now need to copy a file to a server on a different domain. If I were to do this manually it would prompt me for my username and password.

I don't see any way to put a username and password with doing an IO.File.Copy. Is there a better way to do this?IO.File.Copy(strSource, strDest)

View 1 Replies

VS 2008 Appropriate Method Of Copying/Replacing A File?

Feb 14, 2010

In my current program I need to be able to copy a text file, renaming it to default.txt, and overwriting the existing default.txt.

View 3 Replies

File Info - Pass Delete And Copy File Method On A Button?

Jul 22, 2011

i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.

[Code]...

View 8 Replies

File I/O And Registry :: File Stream - Backup Program That Zips Files ?

Feb 9, 2009

I am writing a backup program that zips files. Using some sample code I have the following that creates a zip file. Problem is it does not get any subdirectories or files. Where am i going wrong?

Dim azFileNames() As String = Directory.GetFiles(SourceFolder)
Dim objCrc32 As New Crc32()
Dim zipStream As ZipOutputStream

[CODE]...

Alternativley, there is another component to the zipping dll that I could probably bypass the above altogether. It is: FZ.CreateZip(DestFile, SourceFolder, True, "", "") Where DestFile is (Output stream as system.io.stream). I'm trying to read all the files, directories, sub dir and files, etc from a specific location, let's say 'My Documents' into Destfile in which the FZ.CreateZip zips the file. FZ is FastZip which is from icsharpcode.net. They have c# examples, but that's greek to me. I'm trying to just learn VB!

View 6 Replies

File I/O And Registry - File Storage - Where The Best Place To Keep Files For A Program

Jun 2, 2009

Looking for an idea of where the best place to keep files for a program. I use them frequently and they interact with the program directly. I want to place them in a place where they won't be easy to find if someone is just cruising thru the directories. Any ideas?

View 7 Replies

Using Copy Clipboard For Copying Files?

Aug 15, 2011

i need to use copy clipboard for copying files for example i ll copy some file then i need to save this somewhere in my program how can i do that? i searched little but i just can find copying strings. :S I need more than that :)

View 4 Replies

File I/O And Registry :: Copy Directory To Documents Subdirectory?

Dec 29, 2009

I am writing a program that needs to be able to copy a directory from C:Folder to a folder inside My Documents.I am aware of the My.Computer.FileSystem.SpecialDirectories.MyDocuments which places the directory in the root of My Documents. I however, want to copy the said folder to 'My DocumentExampleFolderFolder1'

View 1 Replies

Copying A File Into One Of The Program Files Folder Requires A Permission?

Feb 22, 2011

I have an issue with the Windows permission system. And every time it tries to do something that needs a windows permission (to be ran as administrator) it fails !

At the moment I was trying to implement an updater which should download a file from an ftp site but because copying a file into one of the program files folder requires a permission I am not able to do this.

View 1 Replies

File I/O And Registry :: Downloading Using Method Other Than Webclient Object?

Sep 19, 2008

I seem to remember reading the MSDN somewhere that there was another method to download files from URIs other than using the webclient object. I'm trying to download some raw php files but every time I use the webclient object the server interprets them as an HTTP request and instead serves the default web page that the php file builds and not the php code itself.

View 3 Replies

File I/O And Registry :: AVI Header - Program To Download And Play AVI Files The Files Are Large In Size And Long Time Wise

Dec 11, 2011

I wrote a program to download and play AVI files the files are large in size and long time wise. I have the files playing as they are being downloaded but i can't see how long the file is or seek reliably. i was reading that the AVI headers are in the last 512kb of the AVI file *why would't they put it at the start* lol so my question is is there a way to download the last 512Kb of the file i'm downloading. i have the Bytes Read and Length of the file while its downlaoding i'm just not sure where to go from there, or how to do it atleast. If i had the length in time of the Avi file i could set the trackbar to be able to seek properly. or if someone has an idea how i could get the time of the video by using fps and some math i could prob do it that way too but idk how i would tell how i can find how many kb are in the fps i'm sure it changes so think that way is't going to be reliable. how to get the last 512kb would be the best option not sure if it can be done even.

View 4 Replies

Copying File Tool Strip Menu Item To Show Certain Files From A Folder?

Jan 21, 2010

In word/excel/office programs when you press the file menu item at the bottom a list of files recently used are shown, i would like to do a similar thing but i would like to put files from a certain folder with a certain extension (.xml) into my file menu item so the user can select to view the files.

I think i need something like:
For each file (extension .xml) in myFolder
If menuItem = Nothing

[code].....

View 4 Replies

Progress Bar To Work With File.Copy Method

Jun 26, 2009

I have a function that I use to copy files from one location to another.I want to incorporate a status bar to illustrate the progress of copy.I am assuming that I need to put additional logic after my File.Copy stmt below. [code]

View 9 Replies

Progress Bar To Work With File.Copy Method?

Mar 4, 2009

I have a function that I use to copy files from one location to another. I want to incorporate a status bar to illustrate the progress of copy. I am assuming that I need to put additional logic after my File.Copy stmt below.

Public Sub CopyFiles(ByVal sourcePath As String, ByVal DestinationPath As String, ByVal fName As String)
If (Directory.Exists(sourcePath)) Then

[code]......

View 7 Replies

File I/O And Registry :: Save File Dialog - Allow Users To Choose The Directory To Save Files Into

May 8, 2010

I am trying to find a way to allow my users to choose the directory to save files into, THe file name is automatically generated as it has a naming convention and i am able to pre program a location to save to but i d like to be able to allow my users to decide themselves which directory they want to save the files to and to have the ability to choose which directory to save to

[Code]...

View 2 Replies

File I/O And Registry :: How To Access Files

Sep 6, 2008

I'm new in vb.net (application). I need to access files or browse files using vb.net. Does anyone knows how can I do it?? I can use the listview??This is the process:I have a form and I need to browse folders and drivers (C drive/network drive...) in the same form. But how can I do that, how can I display the icons, file, etc. and open it in listview or any control in vb.net.

View 3 Replies

File I/O And Registry :: List Of Files?

Jan 19, 2009

Is there a way to get a list of files in a certain directory and then put them in a context menu strip then when they are clicked have the program open the file. I'm trying to make a flash player that can show the list of flash files and when you click the file path on the context menu strip it will play from that file. Here is what I have:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OpenFileDialog1.Filter = "Shockwave Flash Objects (*.swf)|*.swf|All files (*.*)|*.*"

[code].....

View 2 Replies

File I/O And Registry :: When To Close Files

Jul 24, 2010

I should mention that I'm mainly concerned with Random files.Which is the best method?

1.) Open file, manipulate data and immediatly close the file. (Which means doing this alot everytime data needs to be read, edited, deleted, or saved)

(2.) Open the file when the app starts and let it open for data manipulation until it's time to close the app at which time the file would be closed.

I was always taught option 1. The main reason at the time was to cut down on the chance for data corruption in the file or an outright loss of the file due to outside circumstances like power failure.

View 1 Replies

File I/O And Registry :: .Net 2003 Win App Can't See Local Files

Jan 25, 2012

I'm programming a small windows app that allows the user to fill out some fields and then creates and runs a batch file based on their entries. The program works, but it doesn't.The program creates the batch file just fine but when it tries to run the batch file, it gets errors in the cmd window saying it cannot find the scripts the batch file is trying to call. What's confusing me is that if I take the batch file the program created and run it myself, it works just fine so I know it is not the batch that is the problem. My best guess is that there is some security setting for vs.net that I've overlooked but I am only an "every once in a while" programmer so I really don't know where to look. Additionally after running the batch, the program is supposed to delete the batch file but that fails as well with the message that it cannot find the batch file, the same batch file that it had just created and run.

View 1 Replies

File I/O And Registry :: Altering All Files In Folder?

Dec 10, 2008

have just started vb .net and im working with the 2005 edition, but i would now like to make a program that i can use at home that will alter files names,Bassically where i rip cd's to put them onto my mp3 player they are always given a name starting with 01. etc, what i would like is a small bit of code that uses a while or for loop to go through every file in the folder and remove the first three characters.

View 4 Replies

File I/O And Registry :: Move New Files And Keep The Old Ones For Processing?

Sep 25, 2009

I'm trying to keep the oldest file and move the new ones to a different directory

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved