file

How can I opt the user to delete all files in a folder (but no subdirectories)?

I've got a folder path. The folder contains a lot of files as well as some subfolders. I'd like to let the user delete the files (but not the folders) using the standard windows dialog. I'm currently using this code, which deletes the whole folder. Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory ( path, UIOption.AllDial...

I need to pull large backup files from my clients' servers to my server every month

I have clients out there running an SQL Server Express 2005 and each of these needs a backup each month and that backup needs to be moved to our server in case they lose their backup. Our software automatically backs up the database each month but we have to manually go in and copy it across. Is there any way to automate the copying of f...

File version information

How can I add version information to a file? The files will typically be executables, .so and .a files. Note: I'm using C++, dpkg-build and Ubuntu 8.10 if any of those have support for this. ...

HTML File input JS events

Hello, Are there any JavaScript events in type=file input? I.E. I would like to add an extra file input upon selecting file in one of allready created: Diagram:] : file input 1 file input 2 file input 3 user selects some file in input 1 and JS adds new file input file input 1 - somefile.txt file input 2 file input 3 *NEW* file inpu...

Self updating application question

I've been looking at a simple machanism for self-updating executable files. (I can't use Click-Once due to the nature of the application - trust me on this) I've noticed that an in-flight assembly can move itself to another location on disk, presumably because the executing assembly is actually an in-memory copy), and that the original...

File.WriteAllText Weirdness In Windows 7?

This one had me going crazy for awhile. I have an app that was behaving strangely and claiming files had been written when they clearly had not. It was especially confusing because when I ran this app in debug mode or the bin directory of my project it seemed to work fine. As soon as I moved it to a folder within the Program Files fold...

struts2 i18n java properties, how to escape characters?

I don't know how to escape ' in a java properties file. I'm using struts2 and getText function to fill i18n and text tags. For example I use: config.users.title= taula d'usuaris ---> config.users.title= taula d\'usuaris But in my JSP, I get : taula dusuaris. I use this to display text on my JSP: <label for="title"><s:text name="con...

Need to delete a file, in use by my own app

I'm fiddling with a desktop gadget (a clock). It has a reflection effect underneath it that needs to be transparent, and I'm using CopyFromScreen to get the background, then just setting the form background to this. Like so (part of a "dock/undock" button): Rectangle bounds = this.Bounds; using (Bitmap ss = new Bitmap(...

WinForms equivalent of Java's JFileChooser.FILES_AND_DIRECTORIES

Java has JFileChooser.FILES_AND_DIRECTORIES to allow the user to select a file or a folder. .NET WinForms has OpenFileDialog for files and FolderBrowserDialog for folders. Does .NET have any component that can allow for either? ...

Parsing input from file into an ADT ArrayList

Hi, I'm having trouble parsing input from a file. The file is separated by lines, using ':' as a delimeter value. I'm having trouble getting the input into an ArrayList, and I think it's because I'm ineffectively using a variable within the while loop. If the variable newItin changes, it is still referencing the same object, or rather is...

Read a file in reverse order using python

Hi, How to read a file in reverse order using python? I want to read a file from last line to first line. Any one can help me? Thanks in advance, Nimmy ...

Reading unicode characters from text file in Delphi 2009

I have the following piece of code to read Japanese Kanji characters from UTF-8 format Text file and then load it into Memo. Var F:textFile; S:string; Begin AssignFile(F,'file.txt'); Reset(F); While not EoF(F) do Begin Readln(F,S); Memo1.Lines.Add(S); End; CloseFile(F); End; But instead of characters I see some set of totall...

file manipulation and find a word and tricky replace

I have file something like this hostname ser1-xyz myuser name passwd secret group 1234 hostname ser2-xyz myuser name passwd secret group 2345 I need to find the line first appearance of host named "ser1-xyz" and modify it as "ser1" and increment it's the group value by 1 So that final file looks like : hostname ser1...

Getting old names for renamed files

Is it possible to get old renamed-files names in Windows XP without using system restore? ...

Change File Encoding to utf-8 via vim in a script

Hi, i just got knocked down after our server has been updated from Debian 4 to 5. We switched to UTF-8 environment and now we have problems getting the text printed correctly on the browser, because all files are in non-utf8 encodings like iso-8859-1, ascii, etc. I tried many different scripts. The first one i tried is "iconv". That o...

how to remove or hide videofile extn in qt

hi i am having one insert button from which i can select videofiles either from phne memory or memory card.but all the files are coming with name and extn(.3gp).how i will remove this or hide this in QT ...

C#: Internal file database in application

I am currently working on an Paint-like WPF application and now stand before the problem how I enable my users to save the created images. Normally I would just save them to disk but in this application I have the requirement to later enable the user to create bigger "images" out of the already created ones. This would still be no proble...

Flash / AS2 Socket Policy File issue

I've been trying to establish a connection between my flash client and java server for a few days now, but having trouble with the socket policy server. I've read a lot of info online (including the Adobe guide on how to create one) but still I can't get it to connect, other than in the "Test Movie" option in CS3. The source for the cl...

asp.net - Hyperlink not working

protected void Button1_Click(object sender, EventArgs e) { System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@"C:\Documents and Settings\Admin\Desktop\New Folder\"+TextBox1.Text); foreach (System.IO.FileInfo file in dir.GetFiles()) { HyperLink h = new HyperLink(); h.NavigateUrl = "file:///c:/Documents ...

while using g.drawImage(img,0,0,100,100,0,0,0,0,null) it does not produce any result?

while using g.drawImage(img,0,0,100,100,0,0,0,0,null) it does not produce any result. So how to draw on the image in file of a better way? ...