We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d19ae0 commit 91d55f0Copy full SHA for 91d55f0
1 file changed
SaveWin10Pictures/Program.cs
@@ -14,6 +14,12 @@ private static void Main()
14
List<string> files = new List<string>();
15
int counter = 0;
16
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
17
+ // remove domain if any
18
+ if (userName.Contains("\\"))
19
+ {
20
+ userName = userName.Split('\\')[1];
21
+ }
22
+
23
string imagePath = $@"C:\Users\{userName}\Pictures";
24
if (Directory.Exists($@"C:\Users\{userName}\Pictures\fond_ecran"))
25
{
0 commit comments