73 |
Environment.Exit(1); |
Environment.Exit(1); |
74 |
} |
} |
75 |
|
|
76 |
|
String baseName = Path.GetFileName(fileName); |
77 |
|
String archiveFile = archiveDir + "\\" + baseName; |
78 |
|
|
79 |
|
if (File.Exists(archiveFile)) |
80 |
|
{ |
81 |
|
Console.WriteLine("Archive file already exists {0}", archiveFile); |
82 |
|
Environment.Exit(1); |
83 |
|
} |
84 |
|
|
85 |
|
|
86 |
StreamReader input = null; |
StreamReader input = null; |
87 |
try |
try |
144 |
|
|
145 |
input.Close(); |
input.Close(); |
146 |
|
|
147 |
String baseName = Path.GetFileName(fileName); |
|
148 |
Directory.Move(fileName, archiveDir + "\\" + baseName); |
Directory.Move(fileName, archiveFile); |
149 |
} |
} |
150 |
|
|
151 |
//If an error has occurred in the above,try to identify what went wrong. |
//If an error has occurred in the above,try to identify what went wrong. |