files

Using command-line argument for passing files to a program

How can I receive a file as a command-line argument? ...

Best way of sending a file to SQL server and save it, then reading it from DB?

Hi I am developing a software with vb6.0 :( . I wanna to know that what the best code for saving a file in SQL server and then reading from it is? I should say that I use ADODB.Stream when saving file..... what is you suggestion? ...

Mulitple FileSystemWatchers a good idea?

Hi, I'm writing a mini editor component that is much like Notepad++ or UltraEdit that needs to monitor the files the users open - its a bit slimy, but thats the way it needs to be. Is it wise to use multiple instances of FileSystemWatcher to monitor the open files - again like Notepad++ or UltraEdit or is there a better way to manage t...

Big files uploading (WebException: The connection was closed unexpectedly)

UPDATED See post #3 below. There is a need to upload a file to the web automatically (without browser). Host - Mini File Host v1.2 (if this does matter). Didn't find specific api in documentation, so at first i sniffed browser requests in Firebug as follows : Params : do Value : verify POST /upload.php?do=verify HTTP/1.1 Host: webfile...

SharpSVN read ALL filenames

hey, still a bit of a n00b on SharpSVN, I'm looking to get some simple code to open up an SVN repository, and read (at least) the full path of all files in a specific folder. Lets say that this folder is \trunk\source I'm not looking to checkout or commit, just read into a list I'm also looking to read ALL files, not just the changed...

Integrated File Browser in .NET Winforms?

I'm looking to integrate a file browser that given a directory uses this as a root (can't go any deeper). I've used the System.Windows.Forms.WebBrowser control with some Button controls to support directory navigation (which disables when you hit the root). It works great except when the window is large it provides a properties bar on ...

Has Windows 7 Fixed the 255 Character File Path Limit?

As I understand it, the limitation of 255 characters in a file path is a Windows limitation. What is the reasoning for this? If so, has this been resolved in Windows 7? In our continuous integration practices, we often have deeply nested project structures and it would be extremely useful to be able to go beyond 255 characters. Right no...

Fast Algorithm to Generate 500,000 html file.

What is the fastest way (Algorithm) to generate 500,000 static html files from DB? And is it a good practice to put all this files in single folder? or create hierarchically for this files? We want to handle about 6,000,000 concurrent hit, so the static files will be a good solution for that. the source DB will be simple flat table wi...

How do I copy a folder and all subfolders and files in .NET?

I'd like to copy folder with all its subfolders and file from one location to another in .NET. What's the best way to do this? I see the Copy method on the System.IO.File class, but was wondering whether there was an easier, better, or faster way than to crawl the directory tree. ...

How to Send a Any File Type through Redirect in ASP.NET?

I currently have a TreeView showing a directory in a web page. I don't think you can capture click events on a Node so instead I'm creating the navigation link to the same page which processes a parameter (path). I've tried a couple things: Response.ContentType = "text/txt"; Response.AppendHeader("Content-Disposition", "attachment; f...

How can I use a data file in a VS 2008 unit test?

I have the files checked in to svn. The key is that I don't want to hardcode the paths to the files. How can I use relative paths and be able to find the data files consistantly? ...

PHP Pass external download to user

I was wondering if there was any way in PHP to pass an external download off to a user? What I would like to do with the script is depending on certain conditions, send the user a file from server A or server B. However, I don't want the user to know the direct url to either server. Ex: User visits (which is on server C): http://example...

How to make a static URL point to different servers?

Im building multi-server support for a file upload site Im running. When images are uploaded.... they are thumbnailed and stored on the main front-end server, until cron executes (every 10 mins) and moves them to storage servers, so for the first 10 mins, they will reside, and be served off the main front-end server. When a file is uplo...

How To: View MFC Doc File in Python

I want to use Python to access MFC document files generically? Can CArchive be used to query a file and view the structure, or does Python, in opening the document, need to know more about the document structure in order to view the contents? ...

see if two files are the same in python

Possible Duplicates: Finding duplicate files and removing them. In Python, is there a concise way of comparing whether the contents of two text files are the same? What is the easiest way to see if two files are the same in Python. One thing I can do is md5 each file and compare. Is there a better way? ...

C#: How to open Windows Explorer windows with a number of files selected

In the Library of Windows Media Player you can select one or more music files. You can then right-click and in their context menu choose Open File Location. This will open up one windows explorer window for each directory that the files are in, and the files will be selected for you. So let's say we have a bunch of mp3 files in our lib...

Comparing two xml files in Objective-C

Hi there! I have two xml files (a.xml and b.xml) in my file system (iPhone). Now I want to know if these files contain exactly the same data. Most of the time, this comparison would be true, because b.xml is the result of a copyItemAtPath: operation. Unless it is overwritten by newer information. What would be the most efficient way to ...

Php - troubles with files paths

Hello, i can't understand one thing. In code, for example: $filePath = 'http://wwww.server.com/file.flv'; if( file_exist($filePath) ) { echo 'yes'; } else { echo 'no'; } Why does script return 'no', but when i copy that link to the browser it downloads? ...

Linux: How do I find out if a file has been updated by another process?

Hi, I am currently watching an XML file from log4j output. I have a custom viewer that displays the log-output in GUI. I need to watch this file as to when it gets updated so that the GUI can re-parse and update itself. In C# there is a FileWatcher concept so on Windows no-probs, but what options do i have using C on Linux. Is there a ...

C#: Creating a new file in a directory that you have the DirectoryInfo of

I was just wondering when you have for example: var dir = new DirectoryInfo(@"C:\Temp"); Is there an easier/clearer way to add a new file to that directory than this? var file = new FileInfo(Path.Combine(dir.FullName, "file.ext")); I'm thinking I can probably just make an extension method or something, but curious if something alre...