Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't not seem to successfully overwrite and some other things
    primarykey
    data
    text
    <p>So, basically I've created this program and it's copying the selected file to the the company's named folder in the Roaming AppData folder, which isn't so bad. I mean, the setup now isn't so bad but I would like to have more control over it.</p> <pre><code>string fullFileName = item.FileName; string fileNameWithExt = Path.GetFileName(fullFileName); string destPath = Path.Combine(Application.UserAppDataPath, fileNameWithExt); File.Copy(item.FileName, destPath); </code></pre> <p>At the beginning of the program it checks to see if the custom AppData folder is there. </p> <pre><code>public void checkADfolder() { string folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string specificFolder = Path.Combine(folder, ".program"); if (!Directory.Exists(specificFolder)) Directory.CreateDirectory(specificFolder); } </code></pre> <p>I want the files to go to the AppData folder .program instead of the folder with the Application company name. </p> <p>Also, I am running into an issue with this. When a user selects a file, and then closes the program and opens the program again and happens to select the same file, it gives an error because the file already exists. I need to have it overwrite all other files when the same file is selected.</p> <p>Screw it, I'll also ask this to why I am here. I need the user selected file to replace another file in the AppData folder and rename the user selected file. </p> <p>Basically. User selects file. File name is "user.txt". Now it's in Roaming > .program > user.txt I need that file to replace a file let's say it's called "guest.txt". It's in Roaming > .user > guest.txt I need to copy and rename "user.txt" to "guest.txt" then replace "guest.txt" in the .user folder. I hope that explains everything well enough. </p> <p>I figured I would put everything into one post instead of making multiple. I've searched but can not seem to find any answers :/</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload