.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

copy a folder and subfolders + files from remote location to local drive

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Windows Application


i am making a windows application( C#.Net) in which there is a folder placed at remote location( on other computer). this folder contains files + subfolders inside it. i need to copy all the files and subfolders present inside this main folder to my local drive. How can i do this. 

Thanks in advance

View Complete Post

More Related Resource Links

Copy folder from FTP site using SSH to local machine using DOS batch files



Is there a way to copy a folder from an FTP site listening on SSH connection using DOS batch files? I know that there are several third party tools out there that accomplish this. I am NOT looking for that solution. I tried this in Powershell, but could not find a solution, and I am hoping a simple DOS batch file can handle this.


Any help would be appreciated...

Dave SQL Developer

Copy files from one folder to another

hi  I am able to create a folder but is not able to copy files from the source to the newly created folder. Is there something that i missed out? Thanks  Dim sitename As String = "~/site/" & txtUsername.Text Directory.CreateDirectory(Server.MapPath(sitename))            Try                Dim f() As String = Directory.GetFiles("/site/source/")                For i As Integer = 0 To UBound(f)                    File.Copy(f(i), Server.MapPath(sitename) & "\" & (f(i)))                Next            Catch ex As ExceptionEnd Try  

Copy folder from FTP site using SSH to local machine using a script task (.NET)

  Hello, I need to copy a folder over to my local machine from a FTP site that is listening on SSH/SFTP connection. Could this be accomplished using .NET? I have an SSIS package, and I am wondering if I can accomplish this in a script task...   Thanks DaveDave SQL Developer

Move folder from file share to local C:/ drive on same box



I need to copy a folder from a file share to my local C: drive. Is there an easy way to do this in SSIS, or do I have to write a DOS batch file and execute it from SSIS.

Any help would be appreciated


Dave SQL Developer

Install a wcf as a windows service and copy files from a network location



I need to intall a WCF as a windows service. In side this WCF , I need to copy files from a network location to the local machine and run them.

I tried to give a specific user account ( which has access to the shared location)for the windows service processinstaller and install the service. but this account cant host the WCF since it does not have admin rights.

Is there a way to host the WCF using local account.. and then to access network location in side the wcf using a specific account. ( impersenation??/ )

Thanks in advance.





Programmatically copy all files from a SharePoint Library to a local directory on the server with an


Through the use of an event receiver I am trying to copy all the files in a document library to a local folder on the server.  I am finding examples of how to upload but none to download.

Can someone show me the code or have a good reference for me?


Move SharePoint Document Library Files to Local Drive

How can I move files uploaded into a MOSS 2007 Document library to a local drive? I need to automate this as a job, not a one-time process. Can I use SSIS for it? File Systems Task works fine so long as I create a map drive to the portal. I have tried both the http address and the UNC path to the portal.

Using Microsoft.SqlServer.Management.Smo to backup from remote SQL Server to local drive.


I'm trying to use the Microsoft.SqlServer.Management.Smo class to connect to a remote SQL Server, perform a backup and save it to my local drive.

I currently can only connect to a remote SQL Server and backup and save the backup file to the remote SQL Server drives. The same happens when I connect to a local instance of SQL Server and backup a file, I can only save it to my local drive.

Is there a way to specify to the Microsoft.SqlServer.Management.Smo to save to the [local] or [remote] machines?

Patrick Miron

For more about Microsoft.SqlServer.Management.Smo, check out my other thread at http://social.msdn.microsoft.com/Forums/en-CA/sqlgetstarted/thread/656d522a-06a6-4475-8070-93df75ef83a5

Copying files to a folder on web server



I have few files in FolderA on the web server.

I want the users to select a fews files from FolderA and copy them to FolderB on the same web server.

I want to list all the files in FolderA and allow the user to select a few files and copy.

I want to copy the files programatically when the user selects a few files and click on Copy button.

How to copy the files quickly from folderA to FolderB?




How to use Resource files added to Resources Folder ?



I have added .CSS file in Resources folder of the project.In the same way i can add Images or any other files.But i am unable to use those files in Server Control Project.How to apply CssClass property to any predefined server control to the css file that is stored in the Resources folder  ?

Please guide how to use those Resource files . 

how to change a remote partition into local partition

Our production cube is very huge and the process time is very long (10+ hours), and the data volume is still increasing. Since we have some idle server during cube process period, I'd like to try to put some partitions on the idle server to cut the process time. But I also want to bring these remote partitions back to local after the process is completed. Is it possible to change partition from remote to local? if so, how?

Initialize snapshot fro alternate location - multiple .bcp files for an article

I have to replicate over 50GB of data over a slow network.  I did not use the option to initialize snapshot from database backup because the replication articles contain row filters.  If I do that, I'll have to run a lot of scripts to remove the data and other unnecessary database objects on the subscriber. Instead, I created a workaround.  On the publisher, I first create the actual push subscription to the target subscriber on the publication.  This subscription is set not to initialize from snapshot.  I then created a second push subscription on the same publication, but the subscriber is a random database on the publisher server.  This second subscription is a dummy subscription set to initialize from snapshot - the purpose is to generate the necessary snapshot files.  I then reinitialized all subscriptions and generate the new snapshot files. On the subscriber, an empty database is created with the same tables as the publisher database.  I created an identical publication on this empty database, and a dummy push subscription on the target subscriber.  The subscription is reinitialized, and the snapshot files on the empty database is created.  These dummy snapshot files are then overwritten with the actual snapshot files created on the publisher, and then I synchronize the the dummy subscriptions with the actual sn

Web Folder problem : This file cannot be saved to this location because there is no connection to th

When I check out a Word 2007 document from a list, I cannot save it back to the server.  I get:   This file cannot be saved to this location because there is no connection to the server.  Check your network connection and try again.   I am using a Virtual Machine (Virtual PC).  I have the Microsoft Loopback adapter installed.    The server has a static IP address and is a domain controller. I am able to access the web folder through Windows Explorer.   How do I set up Office, Sharepoint and Webdav so that I can check files out of sharepoint and save them back, on a virtual machine?

Polling FTP-Server and downloading files to our local directory on regular intervals

Issue regarding downloading same file again and again. Let me be clear, I am using SSIS to poll FTP Server on regular intervals to download different files to my local directory. Once the file is downloaded I need to load the file name into table and validate that particular file name against FTP Server next time when I am polling, so that I don't download same file again.                              Question here is how could I implement this either using SSIS or VB Script ???

Autodelete log files on L: drive

Is there a way to automatically delete sharepoint logs on the server L: drive when space fills up?  I keep getting mom alerts on this drive.

Deploy folder for a .rdl files

In a win form app, i use a report viewer for local reporting, the troble is: I can't find a "Aplication relative folder" where to strore those .rdl files, so i can find them in a run time. Thks for any ideas. I'm using vb2010 express an sql 2008 expressDANIEL CABAÑAS LEÓN - I'M NOT AFRAID TO DIE, I'M NOT AFRAID TO LIVE

Synchronizing Local SQL Server Database to Remote Database

I have production server on our intranet and we have website on remote server with its own database. Now we want to sync some tables from our local database to remote database at some interval of time. I have own idea that if data sync is fail than we should get email about that from remote database.For above scenario I was looking some ideas from you guys and different method to do it. I know about replication of database how to do that. Can we do it by asp.net, SSIS package  which will be easy. I need more information on SSIS package how we can do that.thank you.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend