copy

.bat script copy into System32 gives Access Denied

I'm writing a .bat script where I need to copy a file to System32. I change to the folder then attempt to copy the file from a storage folder to the System32 folder. cd C:\Windows\System32 copy %~dp0file.txt file.txt I get an error Access Denied, 0 files copied. I see why this is a problem, because if I try to copy a file to Syste...

Copy extracted files from ZIP to directory

Note: I'm on localhost, so CHMOD'ing is not the answer. Anyway, I can't get to copy the files which were extracted from a ZIP to a directory, the files are extracted, but they won't be copied... the files just lay in the root folder where upload.php is. I've got this: exec('unzip ' . $_FILES['file']['tmp_name'], $ary, $output); $img...

Can Oracle be used to store billion record dataset to implement efficient MOVE and COPY operations for EMC ATMOS?

Hi, Basically I have two questions. I investigate means of implementing WebDAV interface for EMC ATMOS storage. There will be billion(s) of files with thousands simultanous reads and probably hundreds creations/deletions. The problem is with COPY/MOVE/DELETE operations. If the structure is stored in ATMOS (using namespace interface wh...

Python: Overwriting a directory with another directory containing the same files

I'm trying to overwrite a directory with another directory that contains the same files. I've tried using distutils.dir_util.copy_tree(src, dst) but it tried to make a directory for dst instead. The objective is to overwrite the directory and its contents silently. Is there any other way to do so? ...

Distributed, error-handling, copying of TB's of data

We have a box that has terabytes of data (10-20TB) each day, where each file on the drive is anywhere from megabytes to gigabytes. We want to send all these files to a set of 'pizza boxes', where they will consume and process the files. I can't seem to find anything that is built to handle this amount of data besides distcp (hadoop). R...

Working Copy View in PVCS?

Hello everybody, My company is using presently SVN and testing other tools in order to migrate, if a more convenient tool is found. My question is about PVCS. I just wanted to know if PVCS features a view of the working copy as SVN does? As far as I know, in older versions, one has to work in local, out of the control of PVCS, then c...

Do you copy & paste a code?

Do you copy & paste a code from books, articles, msdn whatever or are you always trying to come up with your own solution or implementation (the book etc. is just an inspiration - there are always 2 or more ways how to do it)? Or do you make difference between your noncommercial and commercial code, i.e. if you are writing a noncommercia...

Converting arrays in stl like copy

Hi everybody! It's time for another 'how do i do this in c++ without loosing my grip'-question! This time: Considering the following code taken from cplusplus.com: template<class InputIterator, class OutputIterator> OutputIterator copy ( InputIterator first, InputIterator last, OutputIterator result ) { while (first!=last) *resul...

Bash copying files with variables

Hi New to bash scripting, I'm writing a script to copy my TV shows accross from a download folder to an archive folder. So far I have this: find `*`show1`*`.avi | cp \"" $0 "\" "/mnt/main/data/tv/Show1" find `*`show2`*`.avi | cp \"" $0 "\" "/mnt/main/data/tv/Show2" I understand this is not the best method, but my skills of bash ...

Saving a deep copy of an object, then modifying it and saving another copy?

I have a 'GameBoard' class and am doing a search on it. I want to save the current gameboard in a list, change the state of the gameboard, save THAT one in a list, and so on (so I would have incremental versions of the gameboard as a game progresses). I'm currently doing this with copy.deepcopy, but it doesn't seem to be saving and mov...

Fast file copy with progress

Hello, I'm writing an SDL application for Linux, that works from the console (no X server). One function I have is a file copy mechanism, that copies specific files from HDD to USB Flash device, and showing progress of this copy in the UI. To do this, I'm using simple while loop and copying file by 8kB chunks to get copy progress. The p...

Perl - Push into arrays using variable references versus using variable copies

Question: Why can't I push elements into a 2d array that's inside of a while loop that parses through a SQL result set? I need some help here as to why this happens. The way data is stored into a 2d array can be done several ways, but for my purposes, I need to use the push method. Here's some code that works: my @tt = (0,1,2,3); my...

Photoshop - copy vector mask from a document to another

I "vectorized" a raster image using vector masks made with the pen tool. Now I need these masks (on separate layers) in another document. How could I copy them, to secure their vector-ness, and have them as resize-able objects? I am using Photoshop CS5. ...

How can Python access the X11 clipboard?

I want my Python script to be able to copy and paste to/from the clipboard via x11 (so that it will work on Linux). Can anyone point me to specific resources I can look at, or the concepts I would have to master? Is this possible to do with the Python X library at http://python-xlib.sourceforge.net ? ...

Can't *copy* an index from list to another with a twist in Python

I'm pretty new to python and am trying to grab the ropes and decided a fun way to learn would be to make a cheesy MUD type game. My goal for the piece of code I'm going to show is to have three randomly selected enemies(from a list) be presented for the "hero" to fight. The issue I am running into is that python is copying from list to l...

PHP - copy an array does not work

Hello! I have an array: print_r($resultArray); Array ( [AB34] => Array ( [a] => 13 [b] => 10 [c] => 3 [d] => 88 [e] => 73 ) ... ) And I want to copy this array into another one: $resArray[] = $resultArray; print_r($resArray); -> Array ( [0] ...

AS3: Impossible to copy DisplayObjects with content?

How to copying display objects (sprites, movieclips etc) while keeping thier content (graphics, added display objects etc)in AS3? The most commonly suggested solution by Kirupa (http://www.kirupa.com/forum/showpost.php?p=1939827&amp;postcount=172) doesn't seem to copy any graphics or child display objects: // create a sprite var s:Sprit...

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...

IPhone - copyWithZone leak

Testing my app on the device it returns a leak whe i call the copy of a custom object ande i can't understand why. this is the call: NSMutableArray *arr = [[NSMutableArray alloc] initWithCapacity:5]; for (SinglePart *sp in [copyFrom partList]) { [arr addObject:[sp copy]]; } self.partList = arr; [arr release]; this is the method:...

PHP Copy command failing when spaces?

I am executing the following commands: <?php copy ("http://localhost/.../DSCF8253.JPG" , "sites/default/files/DSCF8253.JPG"); // Success! copy ("http://localhost/.../DSCF8260.JPG" , "sites/default/files/DSCF8260.JPG"); // Success! copy ("http://localhost/.../HERMAN 085.jpg" , "sites/default/files/HERMAN 085.jpg" ); // Fail! ?> The fir...