Linked Questions

-3 votes
2 answers
3k views

When my Windows Form Loads it run the following code Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "F.U.T.U.R.E")); Which therefor create a ...
The_Little_Cousin's user avatar
0 votes
0 answers
58 views

This my static Temp directory. public static readonly string Temp = Environment.GetEnvironmentVariable("TEMP") + "\\Quince\\"; Is it possible to check it in one line if directory is not, create it.
Quince's user avatar
  • 188
258 votes
6 answers
214k views

I have a piece of code here that breaks if the directory doesn't exist: System.IO.File.WriteAllText(filePath, content); In one line (or a few lines), is it possible to check if the directory leading ...
Diskdrive's user avatar
  • 19k
183 votes
9 answers
190k views

Imagine I wish to create (or overwrite) the following file :- C:\Temp\Bar\Foo\Test.txt Using the File.Create(..) method, this can do it. BUT, if I don't have either one of the following folders (...
Pure.Krome's user avatar
  • 87.5k
26 votes
2 answers
29k views

I am concatenating a number of variables and I want to save that string as a file path. Is there a way it will automatically create all appropriate directories if they don't exist without having to ...
leora's user avatar
  • 198k
-3 votes
1 answer
8k views

I have created a wpf application in that I have the requirement to create a folder and in that folder I want a text file to be created dynamically in the application installed folder C:\Program ...
user3702363's user avatar
0 votes
3 answers
7k views

Good day, I just wanted to ask how to check if folder exist on my project's folder. I already have a folder named Temp_File. this is what I've tried but didn't work. if(File.Exists("...
19GreenBlankets's user avatar
5 votes
1 answer
3k views

can any one help me to solve my problem below. I need to watch the file created inside the folder "C:\Logs\CustomService\Testing". I am using the FileSystemWatcher to watch the files created inside it ...
Mahendran's user avatar
  • 496
3 votes
1 answer
2k views

please help me. I would like to create new folder and save a screenshots from selenium therein. I want, when I click the button xxx_1, folder will automatically be created with text which I enter in ...
Freeezer789's user avatar
1 vote
2 answers
6k views

I'm uploading an image to a folder images. it's working fine.but what I actually want is to look for a folder name (I have the folder name) if not found create that folder and give it that name.how ...
mohammad's user avatar
  • 297
0 votes
1 answer
4k views

I know how to create a file in bin/debug. string file = "example" StreamWriter outputStream = File.CreateText(file + ".txt"); But is it also possible to create a folder into bin/debug?
user avatar
2 votes
1 answer
1k views

I'm looking everywhere in the internet but my code doesn't match the others. I have this string outputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), fullname); I ...
Fiendcoder1's user avatar
0 votes
1 answer
1k views

I want to reorganize all the photos from one folder into subfolders of another path, where I want to create new subfolders named with the file creation dates. Example: photo1.png (creation date 12.02....
I.T.'s user avatar
  • 11
0 votes
2 answers
697 views

var appFolder = await KnownFolders.DocumentsLibrary.CreateFolderAsync("Test"); Update: Got it - Used Above Line.------ var folder = KnownFolders.DocumentsLibrary; StorageFolder subFolder = await ...
Ajay G's user avatar
  • 43
0 votes
1 answer
443 views

I'm running SSMS 2008 and connecting to a database on a separate server. I want to search through our stored procedures for specific strings of text. In Visual Studio 2010 this is simple, the quick ...
G3n0c1de's user avatar
  • 139

15 30 50 per page