0

example img

Hello, I wanted to ask if anyone has an idea how to get the path of a folder when I run the .exe as shown in the picture: 1: https://i.stack.imgur.com/2gehe.png my current code looks like this:

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Windows;

namespace FiveM_to_AltV
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string fivemfoldername = "FiveM Cars";
            Console.WriteLine("#######################");
            Console.WriteLine("# FiveM cars to ALT:V #");
            Console.WriteLine("#     by RealityV     #");
            Console.WriteLine("#        v0.0.1       #");
            Console.WriteLine("#######################");
            string foldername = "test";
            string foldepath = @"output\" + foldername;
            if (!System.IO.Directory.Exists(foldepath))
            {
                System.IO.Directory.CreateDirectory(foldepath);
                using (WebClient webcli = new WebClient())
                    webcli.DownloadFile("censort", foldername + @"\resource.cfg");
                using (WebClient webcli = new WebClient())
                    webcli.DownloadFile("censort", foldername + @"\stream.cfg");
                System.IO.Directory.Move(foldername + @"\stream", foldepath + @"\stream");

            }
            else
            {
                Console.WriteLine("the folder " + foldername + " exists");
                MessageBox.Show("the folder " + foldername + " exists");
            }
            
        }
    }
}

and i try to get the folder path as string "foldername" and i don't need the folder where the exe is located but the folder that starts the exe even if this order comes from somewhere else as shown in the picture: picture shown in the besipeil i just needed "J:\adblink" as string only that the program always finds out this tring itself

Kizna
  • 1
  • 1

0 Answers0