Questions tagged [copying]

This tag refers to the process of making an exact duplicate of a file, database, etc.

Use this tag for questions related to copying files, databases, etc. on a system.

374 questions
5
votes
2 answers

How to know where on the SD card the images are being stored, DCIM/Camera, DCIM/100MEDIA?

I have a method in my application which retrieves the last saved image in my DCIM/Camera folder and copies it to another location on the SD card. I've just tested it on another phone and found that it defaults saving to DCIM/100MEDIA. How am I able…
litterbugkid
  • 3,534
  • 7
  • 36
  • 54
5
votes
5 answers

Python - Copying only new files into another directory

I'm trying to copy files from one directory into another ONLY if those files don't already exist. So if I have directory A with files "1.txt, 2.txt, 3.txt" and directory B with files "1.txt, 2.txt", I want to only copy "3.txt" into directory B…
user3893935
  • 53
  • 1
  • 3
5
votes
3 answers

Java.nio.files - Copying files

Can anyone tell me what I've done wrong with the following code. I receive no errors - it just goes straight to the catch. import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class…
user1311422
  • 85
  • 2
  • 2
  • 7
4
votes
5 answers

Guidance for when to explicitly enable/disable copying in C++ classes?

A colleague is cleaning up a couple of libraries. In doing so he's been reading API design for C++ and it talks about explicitly enabling or disabling copying in C++ classes. This is the same thing that Sutter and Alexandrescu say in their C++…
John
  • 15,990
  • 10
  • 70
  • 110
4
votes
1 answer

C++, 'coupling' of member pointers in multiple objects copied from the same original object

#include #include #include #include struct s_A { bool bin; s_A(): bin(0) {} }; class c_A { public: s_A * p_struct; c_A(): p_struct(NULL) {p_struct = new s_A [16];} void Reset() { …
Matt Munson
  • 2,903
  • 5
  • 33
  • 52
4
votes
1 answer

May I use Apache NIFI for transfering files to HDFS system.

If yes please guide me basic steps for this. I scorll through pages and realized that its possible to do it using core-site.xml
sparkingmyself
  • 148
  • 2
  • 15
4
votes
5 answers

Does putting data into std::vector in C++ create a copy of the data?

I am interested if creating a new std::vector (or calling its assign method) creates a copy of the data? For example, void fun(char *input) { std::vector v(input, input+strlen(input)); // is it safe to assume that the data input…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
4
votes
4 answers

NSFileManager - Copying Files at Startup

I need to copy a few sample files from my app's resource folder and place them in my app's document folder. I came up with the attached code, it compiles fine but it doesn't work. All the directories I refer to do exist. I'm not quite sure what I am…
Pripyat
  • 2,937
  • 2
  • 35
  • 69
4
votes
8 answers

How to memcpy() from argv[]?

I want to copy string from argv[0] but I don't know how to get the size of argv[0]. How to do this? int main(int argc, char* argv[]) { char str[20]; if(argc>0) memcpy(str, argv[0], sizeof(argv[0])); }
user1944267
  • 1,557
  • 5
  • 20
  • 27
4
votes
5 answers

How do I read hex numbers into an unsigned int in C

I'm wanting to read hex numbers from a text file into an unsigned integer so that I can execute Machine instructions. It's just a simulation type thing that looks inside the text file and according to the values and its corresponding instruction…
silent
  • 2,836
  • 10
  • 47
  • 73
3
votes
2 answers

How to assign values from a 2 column array to a single column array based on a column meeting certain criteria

I need to make a macro that will gather part numbers from column A and paste them onto another sheet every 8 spaces. The catch is that I need to do this based on order codes: A11, A21, A31, B11, B21, B31, C11, C21, C31, C12, C22, C32, C13, C23, C33…
CodeNewbie
  • 71
  • 6
3
votes
1 answer

Copying an object with a polymorphic member in C++

I wish to express that each object of type V owns an object of type B. B is a polymorphic type, and is therefor accessed through a pointer or reference to prevent slicing (C.145). I find it natural to express this as following class B {}; …
3
votes
4 answers

copy the symbolic link in Solaris

I am trying to copy a link on Solaris OS but find that it does not simply copy the link instead copies the whole contents of the directory/file the link is poinitng to? Which is not in other OSes like AIX,HP-UX,Linux. Is this a normal behaviour of…
kadeshpa
  • 1,607
  • 5
  • 18
  • 23
3
votes
1 answer

CMake Copying Multiple DLLs Failing

So I have seen the other posts regarding moving external dll files to the current project's .exe output location for use at runtime but I seem to be running into an odd issue that I can't find information on. I am using the following custom command…
Wired365
  • 199
  • 1
  • 13
3
votes
5 answers

Automatically Copying folders until a certain limit is reached

Greetings. 1 - Let's say I have about 500 folders of variable size with a total size of 100 GB. 2 - I want to distribute these folders automatically in other folders until the size of 700 MB is reached with the best optimization of space. Example:…
Joao Heleno
  • 370
  • 3
  • 20
1 2
3
24 25