Find Biggest File In Folder?
Jan 15, 2012I have a folder and in it I have 3 files.How would I go about Identifying the biggest(in bytes) and moving it somewhere else on the hard drive, say C:BiggestFile.jpg?
View 5 RepliesI have a folder and in it I have 3 files.How would I go about Identifying the biggest(in bytes) and moving it somewhere else on the hard drive, say C:BiggestFile.jpg?
View 5 RepliesI like to search trough some folders to find files. My code to search trough folders and sub folders are:
Code:
For Each Dir As String In FileIO.FileSystem.GetDirectories(My.Application.Info.DirectoryPath, FileIO.SearchOption.SearchAllSubDirectories)
Next
How can I get the path of each folder and subfolder with this code??
What is the best and fastest way to find the exact location(Drive/Folder) of a specific file, without scanning the whole drive. Right now, I am using those two instructions to locate EXCEL.EXE so I can properly call it with a shell command.[code]It is quite a long process, and I have to deal with some access denied folder like System Volume Information. I am quite new to VB programming.
View 3 RepliesI am new to VB.NET and have been given a project to do and am almost done but there is a part where I am struggling with , cant seem to find a solution.There is a server (\\ntklppt1\download) where my client downloads files on a daily basis. So in a month we receive maximum of 31 files in this formatabs_prod_20110601, abs_prod_20110602, abs_prod_20110603 abs_prod_20110626, abs_prod_20110627, etc.So what my application must do is, if I am now in June, the application must read all files downloaded from the 1st to the 31st of May and take the biggest file and import it to the database.
View 5 RepliesI have like a collection of numbers like in a hashtable for instance
Code:key / val----+------ 1 / 2349 2 / 939 3 / 49444 4 / 93 5 / 114
How would I go about checking which one of those keys holds the biggest value?
Code:For Each dict As DictionaryEntry In htNumbers
'What?
MsgBox(dict.Value.ToString)
Next
Suppose I have 5 Integers(A, B, C, D, and E) and 5 Textboxes. When the program run, the user is going to input 5 numbers to those 5 textboxes. When a button is pressed, a label will show up and write the textbox number with the biggest number.
View 1 Replieshow should i copy a file in system32 folder from resources folder .resx file of my windows application?
View 1 RepliesI'm working on a project which generates numbers. When those numbers have been generated I would like to arrange them from smallest to biggest. Let's say 6 22 8 12 15 2 is generated. Then i want it to be re arranged to 2 6 8 12 15 22
This is the code I'm using:
PHP
Private Sub btnRandomClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSlumpa.Click
Dim random As New Random
[Code].....
What is the numeric data type that can hold the biggest Integer in VB.NET 2010?
View 5 RepliesI need to find folder abc which may reside on the drive directly, eg C:abc, or it may reside in C:xyxghyklmabc
At present I am building an array of all folders (recursive) & using instr, is there a fasteretter way?
How would I create a dir Inside %temp%? Then extract the file to it and Open a That folder. So far this is my code.
[Code]...
Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
If TextBox11.Text = "" Then Exit Sub
MkDir(Dir1.Path + "" + TextBox11.Text)
MsgBox("Folder Created:")
TextBox11.Text = ""
End Subok now the file i have is from my.resources.test1 put this file into the folder that wascreated after mkdir line of code i have tried differnt ways of doing it but dose not work. it seams that this whould be so easy i dont if its me getting a mind block or something
I am wanting to get a complete file/folder listing and then copy these files to another folder.
Here is my
[Code]...
This happens on many folders. How can I get a listing of these folders and also copy these files?
How to find all files from a folder and from all sub-folders?
View 4 Repliesi am trying to use code to find search for a folder and it will give me back the full directory root. I am using this code:
[Code]...
How can i loop trough treeview and get path of directory of each folder in the treeview?I have this code for adding a color to a treeview item, but it seems like its not possible to retrive the folder path...
HTML Code:
'add color to folder in treeview
Private Sub RecurseNodes(ByVal
[code].....
I am trying to make a program that backs up folders. I want to have say 5 folders, then if it is backed up again I want the oldest of the 5 folders to be deleted and the new one placed in it.
How would I find the oldest folder in a directory
How I can find program when accessed to folder... I know it show what file created, but I wish know WHICH program accessed to folder not what is created in folder !
View 14 RepliesWhen I install my Application on a computer, and look in the program folder with explorer, I can not find the application folder,
View 14 Repliesthe first problem is getting my program to load rss feeds from other websites mostly here:http:[url..... im trying to load it using the webbrowser. i want the rss feed to load right onto the form. im positive that its possible. i have the imports system.net in my code already for xml documents.the second is i cant get my program to write into a file that is several folder deeper into the bin folder.[code]......
ive tried playing with the code moving around the folder names, making sure there capitals are correct, etc. but nothing works. it creates the file in the wrong spot.
I want the user to have the option to choose between a lot of pictures in a project folder. So I made a new project folder called: Images.
And when the user presses a certain button this folder should be opened.I want to achieve this like this:
[code]...
After I run the setup to install the program, I will use the program to capture image and answer a survey.Having said that, I have a folder contains image of image capture and database using Ms Access 2007 in my program . Is it possible to make it both in one zip folder (Embedded both together in one folder and locate it in desktop?
View 6 RepliesIn the above form the user will first enter a folder name and click the create folder button,then the folder will be created in the applications bin folder.I did the code for this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "" Then
[code]......
What I'm trying to achieve is for a file to be copied from a templates folder to a project folder. The project folder path is constructed using the selected item in a combo box and a list box. [Code]
View 4 RepliesOk so i have a program that pulls up all the video files in a video folder. I need a code that will move one of the files in the listbox to a recycle bin i made. But i dont want to replace any of the files in the recycle bin i just want a code to move one file out of one folder and into another. So if there is a code for this then great.
View 2 RepliesI am facing problem to upload the file to FTP server. As ftp server is : ftp://myFTPserver.com Current Default Folder: GO.$DataW1.SVMANNET
But I want to upload the file on Go.Data72.CLEVDATA Folder. how to change the path from teh default folder to teh folder where i want to upload the files.
Like from command Prompt we can use ftp> cd GO.$DATA72.CLEVDATA to change the current directory. how can we achieve the same in dot net.
Having difficulty with the module below failing on line 21. It is telling me: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) Basically what it is designed to do is look for a directory, if that exists then look for a file in that directory. If both = True then it should open the folder to browse the files. I believe the issue is with the "Program Files" being 2 words since the script runs using a root path, but I'm not sure how to format the path correctly to make it work?
[Code]...
I wrote a program in VB.NET which uses several .dlls that I programed in c++. The dlls wrap some functions from an old version of the program. On my development computer everything works fine but I build a release version, copy it and the dlls onto the target machine and the .exe starts up fine. When the program tries to use a function from the .dll it throws an exception and says "unable to load DLL "c:/the path/my.dll" the specified module can't be found."I don't know if it makes any difference, but I am defining the dll functions in the main vb project using:Declare Function MyFunction Lib "c:/the path/my.dll" (ByVal in1 as Double, ByRef out1 as Double) as Integer.I have checked the .net framework on the target and version 4 seems to be installed same as the development computer. Both are windows XP machines. I have no idea if it is the way I programmed the .dlls or just something with my vb.net project.
View 1 RepliesI (through a ton of help from everyone here at stack-o) have created a small WCF which is hosted as a Windows service using TCP..Last question for this little bugger; it's time for deployment. In my solution, there are 3 projects. One is the Windows service, another is the imported WCF, and finally a setup project I added for install.I can install/uninstall the service on my machine by going in the solution directory and finding "Setup.exe" or "Setup.msi". Executing either from explorer will install the service on my development box.Now there are a few directories associated with this solution. I'm betting that simply copying setup.exe or setup.msi to my target server and trying to run it will bomb out. How can I find out exactly which files/folder I will need to copy over for deployment?Or should I just copy the entire solution directory? That will be a little difficult for my coworkers as the setup routines are nested in directories 5 deep.
View 3 RepliesI need to find a folder that is shared between all users of a PC, every body being able to read/write to that folder and below, without any errors. I think that the folder "C:Documents and SettingsAll UsersShared Folder" would do the trick. How do I find the path to that folder, regardless of the OS used (Xp / Vista / 7) and regardless of the Windows language (With a french Windows, this folder is called "C:Documents and SettingsAll UsersDocuments partag").
View 5 Replies