Click here to Skip to main content
15,889,773 members
Home / Discussions / C#
   

C#

 
AnswerRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:14
mveRichard MacCutchan15-Nov-18 10:14 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 10:21
professionalKevin Marois15-Nov-18 10:21 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:27
mveRichard MacCutchan15-Nov-18 10:27 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 10:42
professionalKevin Marois15-Nov-18 10:42 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:54
mveRichard MacCutchan15-Nov-18 10:54 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 11:07
professionalKevin Marois15-Nov-18 11:07 
AnswerRe: Detect Network / VPN Connection Part 2 Pin
Nitin S28-Dec-18 1:34
professionalNitin S28-Dec-18 1:34 
QuestionHow to copy also subfolders and their files from an certain folder? Pin
Member 1405587915-Nov-18 4:24
Member 1405587915-Nov-18 4:24 
Can someone help how I can also copy user's desktop folder's subfolders and their files with the code below this text?

For moment I can only copy files from \" + computer + "\c$\Users\Desktop folder but not the subfolders and their files.

C#
string[] dirs = Directory.GetDirectories("\\\\" + computer + "\\c$\\Users\\");
    foreach (string item in dirs)
    {
        FileInfo f = new FileInfo(item);
         user2 = "\\\\" + computer + "\\c$\\Users\\"+ f.Name + "\\Desktop";
         if (Directory.Exists(user2))
                            {
         user = "C:\\Backup\\" + computer + "\\" + f.Name + "\\Desktop";
         Directory.CreateDirectory(user);
         DirectoryInfo folder = new DirectoryInfo(user2);
         FileInfo[] files = folder.GetFiles();
         foreach (FileInfo file in files)
         {
               string temppath = Path.Combine(user, file.Name);
                file.CopyTo(temppath, true);
          }

     }


modified 15-Nov-18 12:00pm.

QuestionRe: How to copy also subfolders and their files from an certain folder? Pin
Richard MacCutchan15-Nov-18 6:04
mveRichard MacCutchan15-Nov-18 6:04 
AnswerRe: How to copy also subfolders and their files from an certain folder? Pin
Luc Pattyn15-Nov-18 8:01
sitebuilderLuc Pattyn15-Nov-18 8:01 
QuestionParsing JSon Pin
pkfox15-Nov-18 3:57
professionalpkfox15-Nov-18 3:57 
AnswerRe: Parsing JSon Pin
OriginalGriff15-Nov-18 4:13
mveOriginalGriff15-Nov-18 4:13 
GeneralRe: Parsing JSon Pin
pkfox15-Nov-18 4:22
professionalpkfox15-Nov-18 4:22 
GeneralRe: Parsing JSon Pin
pkfox15-Nov-18 5:10
professionalpkfox15-Nov-18 5:10 
GeneralRe: Parsing JSon Pin
OriginalGriff15-Nov-18 5:27
mveOriginalGriff15-Nov-18 5:27 
GeneralRe: Parsing JSon Pin
OriginalGriff15-Nov-18 5:42
mveOriginalGriff15-Nov-18 5:42 
GeneralRe: Parsing JSon Pin
pkfox15-Nov-18 22:23
professionalpkfox15-Nov-18 22:23 
GeneralRe: Parsing JSon Pin
OriginalGriff15-Nov-18 22:31
mveOriginalGriff15-Nov-18 22:31 
GeneralRe: Parsing JSon Pin
pkfox15-Nov-18 22:38
professionalpkfox15-Nov-18 22:38 
GeneralRe: Parsing JSon Pin
OriginalGriff15-Nov-18 23:03
mveOriginalGriff15-Nov-18 23:03 
GeneralRe: Parsing JSon Success Pin
pkfox15-Nov-18 23:19
professionalpkfox15-Nov-18 23:19 
GeneralRe: Parsing JSon Success Pin
OriginalGriff15-Nov-18 23:37
mveOriginalGriff15-Nov-18 23:37 
GeneralRe: Parsing JSon Success Pin
pkfox15-Nov-18 23:39
professionalpkfox15-Nov-18 23:39 
GeneralRe: Parsing JSon Success Pin
pkfox16-Nov-18 2:57
professionalpkfox16-Nov-18 2:57 
QuestionGuys need your help am trying to insert data in MS Access database but its giving me a "Syntax Error" and i cnt find the problem....please analyse it and help Pin
Member 1405572615-Nov-18 2:09
Member 1405572615-Nov-18 2:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.