files

Variable Files with Python

Hi, I am trying to have a file path like 'C:\Programfiles\file.txt' but i would like to have file.txt be a variable that i can change whenever i need to. I am trying to compare 2 directories then copy files from one to another if they arent already there. i have this code so far. import os import shutil A= set(os.listdir(r"C:\Users\Mor...

Displaying files in a directory

I am developing an ASP.NET 3.5 web application and I have a folder in the project which contains a list of documents which could be pdf or any of the MS office 2003 or 2007 supported file formats. I would like to display these files to my users as thumbnails (just like the way windows displays files). And when the user clicks on a file i...

How to highlighting differences between 2 html files

My web application has job descriptions. These job descriptions can be modified by some users. Each modification result in a new version of the job description. The content of the job description is edited by the users, in html, directly in the textearea using the tinymce editor. I want to be able to show a user the modifications made ...

How to get list of all files from a folder structure?

How do I get the list of all the files in a directory? It should give me only files, and it should search through all the subdirectories, and the directories inside them etc. Basically the entire folder structure. I have thousands of files and directories. I wrote a recursive function, but it is super slow. Is there any command or...

Adobe AIR - packing 'extra' files with AIR to save to users computer

Hi, Is this possible with AIR (I'd really think it is but don't see any mention in the docs...) - I want to include a few files when packaging the AIR file - nothing to do with how it works, but files I want the end user to have. eg. Say I have a folder of word docs, or pdfs or whatever - I want to put a button in the AIR file that the...

asp.net - how to download files from server.

I want to enable the users of my website to download the files from the server, but I can do it only with those files which are inside the website's folder(by creating hyperlinks to those files). How to enable the users to download files from server which are not in the website's folder but somewhere else on the server. ...

File Replace Confirmation

I am developing an ASP.NET 3.5 web application which allows users to upload files to the server. If the user is uploading a file which is already there in the folder then I want to show a ASP.NET AJAX modal popup asking the user whether he wants to replace the existing file or not and continue the operation depending on the user's input....

How should I go about building a simple LR parser?

I am trying to build a simple LR parser for a type of template (configuration) file that will be used to generate some other files. I've read and read about LR parsers, but I just can't seem to understand it! I understand that there is a parse stack, a state stack and a parsing table. Tokens are read onto the parse stack, and when a rule...

Create event with the batch files

Hi All, Here's what i want to achieve. We have this email archive database which we optimize on a weekly basis . At the moment we are manually logging in run the command and monitor the status. The optimization can take anywhere between 3-12 hours which is making us login every few hours and check if it has finished or not etc. What i w...

Authentication / Denying access to files in directory with php

I have a directory of files that logged-in users can upload to and access. Some of the files are public, and others are private - for internal access only. The filenames and access settings are saved in a database. Can anybody give me some resources or show me an example of how i can use session data (and .htaccess?) to allow access of ...

PHP: Allowing Public and private access to files?

I am building a site that is permissions based. The user can add or remove read permissions to the public for pages as well as files. What is the best way to serve files that are protected, using php? I have seen things like www.mysite.com/download?file=filename.jpg or something like that, but I prefer clean paths. Also, if my files ...

Application to download files to local work station

Hi, We have an existing application that allows administrators to configure links to various different documents that exist on SharePoint sites. The documents configured as links could be from different SharePoint sites. There is a requirement to enable the download feature for the application so that all documents configured are downlo...

Trying to get the files from a directory using list() or listFiles() in java

I am working on a small basic GUI program that gets the files from my resources and gets the names of the files and places them in a combo box. for example i just have a file inside the same package called images and trying to get the files names. the way I get the file is by using the getResoure() like so java.net.URL url = FileDemo.c...

What is the best way to detect file existence in Flash using as2?

I need to check for file existence in Flash on x number of videos. I've tried LoadVars and MovieClipLoader. LoadVars works but it actually loaded the entire video before reporting its done. Without a way of knowing that its started, I can't delete it before its done. I don't what to load the entire video, i just want to check that its th...

C - Reading multiple files

Hi everyone, just had a general question about how to approach a certain problem I'm facing. I'm fairly new to C so bear with me here. Say I have a folder with 1000+ text files, the files are not named in any kind of numbered order, but they are alphabetical. For my problem I have files of stock data, each file is named after the comp...

List of popular importable calendar formats?

Say I wanted to write a program that would export calendar data so that it could be imported into another calendar application. What would be some popular formats for that, and where could I find information on the formats of those files? ...

Fast file access options needed

Hi friends, I want my code to process a file very fast. This file size will vary from single KB to even 2 GB. Even i am ready to create a separate file system for that single file. I will split the file as constant size blocks(probably 8KB) and access it for data read and write. The code wise, the algorithm cannot be changed because i...

How can I have a file for each language's content in this php language detection demo?

This tutorial is about language selection according to preferred language on browser. lang.php: <?php function dlang($Var) { if(empty($GLOBALS[$Var])) { $GLOBALS[$Var]=(!empty($GLOBALS['_SERVER'][$Var]))? $GLOBALS['_SERVER'][$Var]: (!empty($GLOBALS['HTTP_SERVER_VARS'][$Var]))? $GLOBALS['HTTP_SERVER_VARS'][$Var]:''; } } fun...

Streaming Dynamic Files from Spring MVC

I've got a Spring Web MVC application (and also a BlazeDS application, though not as relevant) where files are dynamically generated based on certain client actions. I'd like to just map a certain directory on the file system to Spring MVC (or the app server) url and let it serve the files in that directory (with streaming and standard ...

Reading the next line using LINQ and File.ReadAllLines()

Hi, I have a file which represents items, in one line there's Item GUID followed by 5 lines describing the item. Example: Line 1: Guid=8e2803d1-444a-4893-a23d-d3b4ba51baee name= line1 Line 2: Item details = bla bla . . Line 7: Guid=79e5e39d-0c17-42aa-a7c4-c5fa9bfe7309 name= line7 Line 8: Item details = bla bla . . ...