copy

Copying files to directories as specified in a file list with python

I have a bunch of files in a single directory that I would like to organize in sub-directories. This directory structure (which file would go in which directory) is specified in a file list that looks like this: Directory: Music\ -> 01-some_song1.mp3 -> 02-some_song2.mp3 -> 03-some_song3.mp3 Directory: Images\ -> 01-some_i...

How to copy text file to string in C?

I need to copy the contents of a text file to a dinamically-allocated character array. My problem is getting the size of the contents of the file; Google reveals that I need to use fseek and ftell, but for that the file apparently needs to be opened in binary mode, and that gives only garbage. EDIT: I tried opening in text mode, but I g...

Copy blob data from one table to another on MySQL

I need to copy a set of data from one table to another that includes a BLOB column. I'm using an INSERT query with a subquery SELECT: INSERT INTO dest_table(field1,field2,field3,blobfield,field4) (SELECT t.myfield1,t.myfield2,t.id,t.blobfield,'SomeConstant' FROM tablename t) All fields get copied correct, except the BLOB. I know I'm m...

On Linux, how do I recursively copy files while ignoring certain names?

I need to recursively copy a directory tree, ignoring any subdirectories named 'CVS'. Is there a simple way to do this? ...

Combining files using COPY command and getting odd characters

I have a bunch of small PowerShell functions, each in their own file and I am trying to combine them into a larger file. Using the low-tech approach of the DOS copy command by doing: copy /Y /A functions\*.ps1 super.ps1 works fine however where two files are joined it is inserting:  I'm guessing it's the line break characters showin...

jQuery: get the file name selected from <input type="file" />

This code should work in IE (don't even test it in Firefox), but it doesn't. What I want is to display the name of the attached file. Any help? <html> <head> <title>example</title> <script type="text/javascript" src="../js/jquery.js"></script> <script type="text/javascript"> $(document).ready( function(){ ...

Progress Bar and File Copying Problem?

Using VB 6 In my Project, when I copy the file from one folder to another folder, at the time I want to show the progress bar like copying…., Once the file was copied the Progress bar show’s 100 % Completed. Code. 'File Copying Private Sub Copy_Click() Timer1.Enabled = True Dim abc As Integer Dim line As String abc = FreeFile Open A...

Copying a dictionary with multiple sub dictionaries and only returning certain keys from the sub dictionaries.

In my current iPhone project, I have a created a dictionary that groups the sub dictionaries by the first letter of the "Name" key. NSLog returns the following. I would like to create an identical dictionary that only shows the "Name" key under each initial letter key. What is the best way for making a copy of some of the items in the su...

Existing Word Document into temporary one

I have a Word document (template) that I want to programmatically modify and than display to the user. I have been able to open the document and modify it but I realized that I was working on the template, while I would like to create a temporary file and work on it. Have you got any suggestion? I tried: myDocument.Contect.Text = Doc...

BASH copy all files except one.

I would like to copy all files out of a dir except for one name Default.png. It seems that there are a number of ways to do this. What seems the most effective to you? ...

Batch: Do what ThinApp does

Hello, i want my batch file to do something like VMWARE's ThinApp Setup Capture does. So, this is what it basically needs to do: first run a total computer scan at any files, folders, register keys etc, and make a total list of them. after the user wants, it will do everything again and check for the differences between those two lists...

Copy to all folders batch file?

i want to copy a file (example: a.jpg) to all folders in a directory. i need something like copy a.jpg */a.jpg do you have a batch file that does something like that? (ps. i use windows) ...

How to return a copy of an object instead of a reference in actionscript 3?

Imagine I have an object called "image", now I want to create multiply copies of this image to display it multiple times and with different properties. When I do image2 = image;, only the reference is copied and I thus still change the properties of the first object. So, how to return a copy of an object instead of a reference in action...

How Do I copy the files and the Folder Tree to Remote Machine?

I have two machines Server A and Server B I want to copy all the files and folder tree from Server A to Server B and create the same file and folder tree using powershell scripting I have tried the command given below but it copies only the files in the folder but do not create the folder tree Copy-Item E:\TestSource\* //TestDestinati...

Copy a changing file with File.Copy

Hi, I'm writing some sort of backup tool that has to copy all the files in a directory. Now I'm using C#'s File.Copy(String, String, Boolean) method. But another application (which I can't change) simultaneously writes to the files in that directory. So now I wonder if it is possible that a file gets changed halfway the copying process...

Copying Files with Spaces

I'm trying to copy one file to another directory, but the way I am copying the file is not working when the source path has a directory with spaces in it, e.g. /Volumes/public/Music/Directory With Spaces/01.mp3 I am using: http://commons.apache.org/io/ I can't find a way around this, any ideas? Edit: The problem should probably be p...

File copying in Java

What is a better option (in terms of performance): copying a file using fileinputstream and fileoutputstream or running a OS specific command copy command from Java? ...

Java: Copy array of non-primitive type

What is the prefered way to copy an array of a non-primitve type in Java? How about performance issues? ...

Compare the value of a variable at intervals

Hey I have a problem comparing the value of a CGPoint (struct with two ints: x and y) with another at certain time intervals. One is called location and has the value of where the cursor is. Every half a second or so, I want to see if it changed. How do I do this? The language is Objective-C (so C++/C stuff should work) ...

If input2 empty copy value from input1?

Hello everyone! This is my first message here so I hope that newbies also get help :) My problem is following: let's start with code first.... javascript: $(document).ready(function(){ if ($("input#datum2").val() == "") { $().click(function(){ $("input#datum2").val($("input#datum1").val()); }); } ...