Copy Directory From Another Computer?
Apr 30, 2011I want to copy directory from my computer to another computer I trying the following code but its not working
My.Computer.FileSystem.CopyDirectory("\192.168.0.254dBackup",
"D:Project")
I want to copy directory from my computer to another computer I trying the following code but its not working
My.Computer.FileSystem.CopyDirectory("\192.168.0.254dBackup",
"D:Project")
I need to copy a file from a local computer to a remote computer on the network, if i try to use File.Copy without logon i get the following error:"Logon failure: unknown user name or bad password."How do I provide user name and password for file copy?
View 2 Repliesam trying to scan a directory and copy all excel files to a single directoryhere is the codeTry
For Each foundFile In My.Computer.FileSystem.GetFiles("e:datainventory_resultsarchive", FileIO.SearchOption.SearchAllSubDirectories, "*.xls")
[Code]....
I have a straight-forward task I'm attempting to accomplish. I have the mechanics down, and need to hammer out the details but I'm stumbling across one small point. :)
This script is supposed to take the files in the local C:Temp directory, and copy them to a selected user's shared directory on the file server.
Protected Sub btnCopy_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCopy.Click
My.Computer.FileSystem.CopyDirectory("C:Temp", "\MAVERICKVOL1Users" & ddlName.SelectedValue & "DESKTOPRECORDINGS", True)
End Sub
This script does indeed work (and I'm aware I need to create exception handling) but it only copies what contents are on the server's directory of C:Temp rather than the local source directory.
I'm using VB.NET/ASP.NET to achieve this.
How am I able to direct my function to use the local user's directory rather than the remote server?
Is there any simple way to copy a single file out of one directory to a new one?
I tried this:
[Code]....
I have some problem with copying the file from one Directory to another directory by create the folder if that folder is not exists in destination directory.
Example:
Source path: C: emp est1.txt
destination path: C:Data
[code].....
how to copy, delete, show files, show current directory, change directory, make folder, rename folder. My problem is i have a method on deleting a file and copying a file, but i don't know how to pass the method so that when i click the delete button it would let me choose what file to delete. By the way im using buttons on each function.[code...]
View 2 RepliesHow do I find the description for a computer in ActiveDirectory?
View 6 RepliesThis has to be really simple and I am completely missing the boat. I have a VB2008 express windows forms project with several forms and an access database that I work on here at work. I want to copy it to a thumb drive and take it home and work on it there, then bring it back, etc.
View 1 RepliesSay that I copy my entire Project Folder from computer A unto a CD, can I paste the Project Folder unto computer B and continue working from computer B?
View 2 RepliesI am trying to get the next available computer name based on a pre/sub fix e.g. "PC0001", atm I have a working solution from sql asset database.Anyone got an idea on how to convert the following from sql query to directorysearcher.filter?"Select TOP 1 Computername from computers where Computername LIKE '" & computerNamePrefix & "%' AND ISNUMERIC(right(ComputerName,4)) = 1 ORDER BY Computername DESC"At the moment I got the following
mySearcher.Filter = "(cn=*pc*)" mySearcher.Sort = New SortOption("Name", SortDirection.Descending)
I get all Computers name from ldap and I wish to search a file at remote machine and copy it at any desitination. so I have following question1.How can we connect remote machine if they have user name and password?
View 1 RepliesI'm trying to copy a file to a remote computer using the IO.File.Copy method. When I attempt to copy the file, the method throws an UnauthorizedAccessException exception, which is understandable because I am not able to supply logon credentials. My question is: I have the logon credentials (Computer name, username, password) so how can I copy the file to the remote system without resorting to an overkill API call (namely WNetUseConnection)?
View 7 RepliesWhat I tried was using My.Computer.Network.DownloadFile(), and created a shared folder in the other computer to do downloading stuff.But, in fact I didn't know how to fill the path to the other computer, the error was: "...path not supported..."
How about this:
ServerName1 = cmbServerName1.Text.Trim()
database = cmbDataBase1.Text
[code]......
i'm trying to copy a file from my computer to another comp. i'm using windows xp, and the other comp is using a win xp embeded. on the other machine i run a web service which has a function that gets the file's url and tries to download it. i'm trying to use a shared directory from my computer, and i'm getting an access denied error. When i try to cennect directly from the other machine (using run...), all works fine, even with a test program.
[Code]...
I have downloaded VB express 2008 from Microsoft site on one computer. This computer has access to a wireless internect connection so it was quick to install vb express.
I want to install VB express 2008 on another computer which has access to a dialup internet connection and being so slow i am unable to download it. Is it possible to copy VBE installed on one computer to other computer through a USB drive.
I will be working with another programmer today. He is just installing VB 2010 Express this morning on his computer. My question is how do I copy some of my projects over to his computer. Will copying the folder(s) under C:Documents and SettingsMy_User_NameMy DocumentsVisual Studio 2010 Projects.. be sufficient or will there be other support files I need to copy as well?
View 3 RepliesI apologize if this is the wrong forum. I'm searching for all computer objects in an OU in Active Directory. I'm able to get the computer name, DN, and description but cannot get the memberOf properties. I'm wanting to get all groups the computer is a member of. My code is below:
[Code]...
How can i copy a file in my resource to other folder in my computer.
View 4 Repliessample vb .net source to copy file from a network computer?
View 2 RepliesI'm trying to do is write a small program that copies a file from a USB to another directory so a program already installed on the computer can load this data. Usually copying files from one directory into another wouldn't be an issue.
[Code]....
Im trying to copy a file from one directory to another. I have this error..The process cannot access the file 'E:\MainMovie\Did you hear about the Morgans\frontCover.jpg' because it is being used by another process.Im displaying an image in my main interface and ive added a file browse dialog to add your own picture.How can i free up the resource? dispose of the picture 1st because it is in memory? [code]
View 2 Repliesive been have a bit of a problem with copying a file to another directory.In my app i display an image, i provide an browse for a new picture button.This feature will copy the file from the users choosen directory and copy it and place it into a specific directory. The problem imhaving is the image i want to replace is in use by the app and wont change.i use picturebox.dispose() to free up the image in memory but it doesnt seem to work.
[Code]...
FileCopy(strSource, strDestination) This is the way i know to copy one file from one directory to other.But how about copying multiple files? Like copying *.txt from Folder1 to Folder2.
View 5 RepliesReferencing this question/code:
How do I copy a folder and all subfolders and files in .NET?
I'm trying to copy a buntch of sub directories to a different directory. I'm wanting to update this code:
Dim fso As System.Object = New System.Object
fso = CreateObject("scripting.filesystemobject")
fso.copyfolder(sour, dest)
[Code].....
Is there a easier way of doing this with less lines of code like the fso As System.Object version? Also, I have System.IO imported however File.Copy and Directory.GetFiles are not colored blue, could this be the issue? I have the System loaded as a reference.
I am working on an application and I keep getting an InvalidEnumArgumentException when trying to copy a directory. I do not understand why. Here is my code:
Public Class firstSync
Public pcname As String = My.User.Name.Remove(0, My.Computer.Name.Length)
Sub firstsync()[code]......
How do I copy a directory in vb.net? I found a file copy, but not a directory copy.
View 1 RepliesWhen I tried copying a directory into another one it only copied the directory files I used this code snippet
My.Computer.Filesystem.CopyDirectory(Path, Backup, True)
i want to copy a file for example photo.jpg to another directory let's say photosdir.....how do i do that?
View 6 Repliesim tring to copy an apk File Over to A Directory on A computer i cant get The File Over.i am using this string:
System.IO.File.Copy(My.Resources.Superuser, ComboBox1.SelectedText)
is there a way i can copy a file from my resources to a User Defined Directory using A ComboBox?