TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Furkan Karagulle
NA
30
3.3k
C# File Copy Problem
Dec 1 2020 7:31 PM
Hi, I'm trying to get a copy of my application to the launch folder.
However, although I did not get an error, my code block does not work and my file is not copied.
I would be happy if you could help.
static
void
ExeCopy()
{
if
(!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @
"\Microsoft\Windows\Start Menu\Programs\Startup\securpass.exe"
))
{
File.Copy(Path.GetFileName(Application.ExecutablePath), Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @
"\Microsoft\Windows\Start Menu\Programs\Startup\securpass.exe"
);
}
}
Reply
Answers (
7
)
I have of numbers List<int> Is it possible to return a random element
How to do a form as fullscreen in c# windows application