files

Objective-c: requesting aid in understanding how to use files/objects effectively.

Hello. I am sorry to bother so late, but i am very much a bundle of nerves. I have tried to understand how to use the information in the couple of objective-c and objective-c game design books I have purchased, but unfortunately, the information is laid out in a way which I dont really comprehend. I would like to state my query and is...

PHP list all files in directory

I have seen functions to list all file in a directory but how can I list all the files in sub-directories too, so it returns an array like? $files = files("foldername"); So $files is something similar to array("file.jpg", "blah.word", "name.fileext") ...

run function block in context of global namespace in PHP

So the senario is that I want to have a custom function for requiring libraries. Something like: define('E_ROOT', str_replace('//','/',dirname(__FILE__))); /* ... */ function e_load($fn, $allowReloading = FALSE) { $inc = E_ROOT.'/path/here/'.$fn.'.php'; if($allowReloading) require $inc; // !!! else require_on...

Including resource files in Qt Creator build directory

Hello, I have a project I am working on with Qt Creator and I'm trying to get it to add my resource files to my build directories (output) automatically. I have the files in the project directory, but I don't know how to edit the *.pro file to make it include additional content files. (If that is even possible?) Does anyone know how to...

Shell Script for renaming and relocating the files

I am working on something and need to solve the following. I am giving a analogous version of mine problem. Say we have a music directory, in which there are 200 directories corresponding to different movies. In each movie directory there are some music files. Now, say a file music.mp3 is in folder movie.mp3 . I want to make a shell sc...

How to open a file which is already open in exclusive mode?

Hi, I want to access a file which is already opened with exclusive access by some other process (not under my control). I know that the I/O manager will not grant my request, as some other process is holding the lock (with exclusive access). Is there any way by which I can bypass the checks (such as file opened in exclusive mode) made ...

Creating a new directory structure and moving files using APS.NET and C#

Can someone tell me what is going to happen in this code when an error is encountered? Ideally it should continue the foreach statement until it gets to the last record, but I suspect it's stopping in the middle of the operation because when I check the number of files moved it's off by 225. If it is in fact stopping because of an error,...

OSX open error 2 : something changed

Something changed recently in OSX. Some legacy code used to test for the existence of a file by opening it in read only mode. This has worked "since forever". For some recent versions of OSX, including snow leopard, this process fails with errno=2 "No such file" if the file is a network share which is alreday open for read/write acce...

Filter Out Branch in Git when Cloning

I have a large repository that I am trying to clone, but there seems to be a few PSD files that have been added that I can't avoid at the current moment. I have a specific path on the repository that I want to checkout but I'm having trouble figuring out what specific command I need to follow. I was told filter-branch is what I need to ...

android text file resource problem

Hi , I have a problem with txt files in my raw folder (android project) Explanation: I am added a some txt files to a folder raw/eng and I need to get that files (read) in class I made some if branches and happens that some files I can reference but some not "R.raw.ejapan" cannot be resolved ??? This is screen shot of ...

Lookup .txt files

Firstly i must say that my english is not very strong, so please forgive me. I have got a question about my project. how do you search for text files on a local drive, i.e files with the .txt extension using the C programming language. ...

How to auto-open file in iPhone Mail into iphone application?

I am working on adding the capability for users to export data from my iphone app. I'd like to allow them to email it to themselves or to a friend. Is there a good way to enable the iPhone mail app to auto-open a specific type of file into a specific app? I know that I could somehow create a specific URL which would open such as myapp://...

Is there a way to move many files quickly in Python?

I have a little script that moves files around in my photo collection, but it runs a bit slow. I think it's because I'm doing one file move at a time. I'm guessing I can speed this up if I do all file moves from one dir to another at the same time. Is there a way to do that? If that's not the reason for my slowness, how else can I spee...

How to change file names using regular expressions in Python?

I have a directory which contains subdirectories which contain files. All the file names have a prefix which I want to eliminate. The prefix is not exactly the same among all the files, but I have a regular expression that represents exactly the language of these prefixes. I'm trying to write a script in Python to change the name of each...

Making a web app compatible with patented file types.

Are there any legal implications to making a web app compatible with patented file types? eInstruction's ExamView (www.eInstruction.com) reads, edits, and makes "ExamView Test" files. Are there any legal implications to making my web app capable of reading/editing such files? ...

Skip lines in file; generic extension methods

Is there a better way to write this extension method? public static class StreamReaderExtensions { public static StreamReader SkipLines(this StreamReader reader, int lines) { for (var i = 0; i < lines; i++) { reader.ReadLine(); } return reader; } } I was thinking something like:...

Copy one file every 5 files from a folder to another one using MATLAB

I would like to copy some files from a folder to another folder using MATLAB routines. My goal is to copy one file every 4 files from the initial folder to the second one. My files look like this: aa-dd-cc-11-01.txt aa-dd-cc-11-02.txt aa-dd-cc-11-03.txt aa-dd-cc-11-04.txt aa-dd-cc-11-05.txt aa-dd-cc-11-06.txt aa-dd-cc-11-07.txt aa-dd-cc...

What is the difference between .py and .pyc files?

I have noticed .pyc files spontaneously being generated when some .py file of the same name gets run. What is the difference between .py and .pyc files? Also, I find that having .pyc files lying around clutters up space. Should one delete .pyc files? Or is there a benefit and/or necessity to having them around? UPDATE: Here are 2 answ...

How to move to non-hidden buffer that exists in some window on some tab?

I work in Vim with lots of open buffers in various windows on various tabs. I know it's simple to just load one of the existing buffers into my current window. However, some of my buffers for large files use folding expressions that cause delay of several seconds when loading them into new window. On the other hand, if they are alread...

Batch script: Search if a folder contains any files

Hi, I am trying to get a batch script to check whether a folder contains any files in it. So far this is how far I have got: IF EXIST %FILEPATH%\%%i\FromGlobus\%FILE% ( %WINZIP% %FILEPATH%\GlobusEOD\ExtraFiles\%ZIPFILE% -m %FILE% IF errorlevel 1 goto subBADEND ) where %FILE% is *.* but what happens is it tries to zip up files even ...