Questions tagged [getfiles]
266 questions
0
votes
1 answer
Post File To Executable
So I'm building a connector-like program (the executable) as the backend of a website, the program is written in Visual Studio 2010 (.NET 4.0) using C#.
Basically, the frontend code will call the executable with parameters (or command line…

sora0419
- 2,308
- 9
- 39
- 58
0
votes
3 answers
Using GetFiles but splitting the results to show full path and just the filename
I am using “GetFiles” to extract files in a specified folder as shown below:
Directory.GetFiles(_dirPath, File_Filter);
This creates a string array which is fine but now I need to do something similar but create a Tuple array where each Tuple holds…

Retrocoder
- 4,483
- 11
- 46
- 72
0
votes
1 answer
List not working upon GetFiles method
Trying to figure out why this isn't working, the list is to retrieve photos using the combobox item (which lists local HDDs root address as items) when selected that item it is converted into a string and supposed to be used as a path for the…

Nathan Anderson
- 19
- 7
0
votes
2 answers
Using Directory.GetFiles() WITH multiple extensions AND sort order
I have to get a directory file list, filtered on multiple extensions...and sorted!
I use this, which is the fastest way I've found to get dir content filtered on multiple extensions:
Dim ext As String() = {"*.jpg", "*.bmp","*png"}
Dim files As…

Jayme
- 57
- 1
- 2
- 7
0
votes
1 answer
How to get the names of all png files in a folder using GetFilesAsync - WP8
I have a folder called AllPage. It has a number of png files. I m trying to retrieve the names of all the files from the folder using GetFilesAsync and apparently it retrieves nothing! :(
This is how I tried
IStorageFolder dataFolder = await…

alfah
- 2,077
- 1
- 31
- 55
0
votes
0 answers
How to correctly search for files in C#
Currently I am using the following code to search for files in a folder:
public string[] getFiles(string SourceFolder, string Filter,System.IO.SearchOption searchOption)
{
// ArrayList will hold all file names
ArrayList alFiles = new…

Tejashwi Kalp Taru
- 2,994
- 2
- 20
- 35
0
votes
1 answer
code that doesn't work...Kill-process , search-for-file , streamwrite on file searched file
can you help me with that code ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As String = "C:\Users\Andy\Documents\Visual Studio 2008\Projects\minecraft srv\"
For Each app As…

Andy Gherghina
- 5
- 3
0
votes
0 answers
C# search for specific file and order by date
I've researched this across various threads and found viable solutions for one or two parts but I'm having trouble linking the two up. Basically I want to search a directory for file of a certain name , if there is is more than one occurance of this…

user2546071
- 51
- 1
- 10
0
votes
2 answers
How do you dynamically path to a remote server folder in C#?
Okay after massive amount of Googling and trying different things this is probably something simple that I'm messing up on.
Basically what I'm doing is parsing a productID from a url and adding XL.jpg to the end. For example lets say the product id…

JavaTheScript
- 137
- 3
- 16
0
votes
2 answers
How to get the filename according to my requirement C# DirctoryInfo.GetFileSystemInfos();
.
net winform
Now I get all the fileName under the specified directory.
the result is "0001_00001523_028155.sql"
but my goal is only to get "00001523"
how can I do that?
private void loadscriptfolder()
{
string folderName =…

CrystalPeach
- 19
- 3
0
votes
1 answer
vb.net can read\ open or save file because of file name issue
I’m trying to edit my code to open all files in the folder ATC (including any subdirectory’s)
If any of these files are found not to contain the text “Index…” that, that particular file is appended to include the text found in document…

LabRat
- 1,996
- 11
- 56
- 91
0
votes
3 answers
Using c# GetFiles Length but only count the files with certain amount of chars in filename
So i'm using the simple
ImgFilesCount = ImgDirInfo.GetFiles("*.jpg").Length;
to figure out how many files are in a dir. But I need it to only count files that have exactly 26 characters in the file name. I tried
ImgFilesCount =…

Matt Winer
- 495
- 9
- 26
0
votes
2 answers
DirectoryInfo GetFiles() filter grid
I am working on a page that displays the pdf files in a specific directory in a grid, along with a link to the file.
I am modifying Scott Mitchell's example here:…

Jack
- 2,741
- 2
- 24
- 32
0
votes
1 answer
Use getfile to define path to initialise image array
I'm trying to make a button which upon being pressed will get all the images in a directory and place them in order in an array of images , I have it working so far where it can get the file paths but I cant get it working for images , any ideas ?…

H65
- 51
- 1
- 8
0
votes
1 answer
PHP filesize error stat failed
I'm using this simple code to catch the file size:
$photoSIZE = filesize($_FILES['photo']['name']);
$attachSIZE = filesize($_FILES['attach']['name']);
i receive the error:
filesize() [function.filesize]: stat failed
i uploaded a 21mb file
what…
user895171