Questions tagged [move]
Usually refers to move semantics; consider using that tag instead. Move semantics is a programming language feature that allows a copy operation to be replaced by a more efficient "move" when the source object is a temporary or an otherwise expiring object.
move
3,448
questions
264
votes
14
answers
461k
views
How to move/rename a file using an Ansible task on a remote system
How is it possible to move/rename a file/directory using an Ansible module on a remote system? I don't want to use the command/shell tasks and I don't want to copy the file from the local system to ...
235
votes
10
answers
508k
views
PHP - Move a file into a different folder on the server
I need to allow users on my website to delete their images off the server after they have uploaded them if they no longer want them. I was previously using the unlink function in PHP but have since ...
183
votes
13
answers
194k
views
Move column by name to front of table in pandas
Here is my df:
Net Upper Lower Mid Zsore
Answer option
More than once a day 0% 0.22% -0.12% 2 65
...
158
votes
7
answers
92k
views
How do I move a single folder from one Subversion repository to another repository?
I have a "docs" folder in a Subversion repository named "project". I've come to the conclusion that it should really be kept under a separate Subversion repository named "project_docs".
I'd like to ...
133
votes
11
answers
286k
views
How do I move a file from one location to another in Java?
How do you move a file from one location to another? When I run my program any file created in that location automatically moves to the specified location. How do I know which file is moved?
105
votes
16
answers
210k
views
How to programmatically move, copy and delete files and directories on SD?
I want to programmatically move, copy and delete files and directories on SD card. I've done a Google search but couldn't find anything useful.
93
votes
7
answers
288k
views
Python - Move and overwrite files and folders
I have a directory, 'Dst Directory', which has files and folders in it and I have 'src Directory' which also has files and folders in it. What I want to do is move the contents of 'src Directory' to '...
79
votes
12
answers
194k
views
Moving all files from one directory to another using Python
I want to move all text files from one folder to another folder using Python. I found this code:
import os, shutil, glob
dst = '/path/to/dir/Caches/com.apple.Safari/WebKitCache/Version\ 4/Blobs '
...
78
votes
5
answers
257k
views
How to delete or change directory of a cloned git repository on a local computer
Used git clone [url] to clone an open source project but it cloned to the
C:\Documents and Setings\$USER\project
What I wanted to do is clone the project to C:\project. I don't want to have ...
71
votes
7
answers
112k
views
Move / Copy File Operations in Java
Is there a standard Java library that handles common file operations such as moving/copying files/folders?
68
votes
9
answers
132k
views
Detect touch press vs long press vs movement?
I'm currently fiddling around with Android programming, but I have a small problem detecting different touch events, namely a normal touch press (press on the screen and release right away), a long ...
68
votes
3
answers
178k
views
How to move files using FTP commands
Path of source file is : /public_html/upload/64/SomeMusic.mp3
And I want to move it to this path : /public_html/archive/2011/05/64/SomeMusic.mp3
How can i do this using FTP commands?
66
votes
9
answers
223k
views
Moveable/draggable <div>
This is my updated and modified script, it works completely, except I would like to universalize it... observe the **** how can I make it so that I don't have to do function(e){BOX.Draggable.elemen = ...
61
votes
1
answer
6k
views
Changes using mutable reference of a field are not reflected after move of the original instance
I was trying to manipulate the field x of the struct Foo by borrowing a mutable reference from its instance foo.
If I try to print the field x using the moved binding y of the instance foo after the ...
55
votes
4
answers
49k
views
How do I move a Perforce "workspace" folder?
I've just downloaded a 4.5GB depot to a location on my hard drive that is not ideal.
I'd like to move the folder that Perforce now sees as the "workspace" folder (iPhone) to another folder on my hard ...
45
votes
6
answers
165k
views
How to move a marker in Google Maps API
I'm using the Google Maps API V3 and I'm trying to make a marker move across the screen. Here's what I have:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-...
44
votes
4
answers
51k
views
Move an element one place up or down in the dom tree with javascript
I want a javascript way to move an element one place up or down in the dom tree within a particular known parent using javascript (or jquery is ok), but i want the script to know when an element is ...
41
votes
5
answers
298k
views
How to move table from one tablespace to another in oracle 11g
I run oracle 11g and need to move table (tbl1) from one tablespace (tblspc1) to another (tblspc2). What is the easiest way to do that?
32
votes
2
answers
22k
views
git, sure-fire way to move/rename files while keeping the history
I know there are "lots" of existing questions that looks similar, so let me summarize them before asking mine.
The answer to Is it possible to move/rename files in git and maintain their history? is,...
30
votes
4
answers
9k
views
How do I move values out of an array one at a time?
I have ownership of an array of size 3 and I would like to iterate on it, moving the elements out as I go. Basically, I would like to have IntoIterator implemented for a fixed-sized array.
Since ...
27
votes
6
answers
75k
views
Move files in C#
I am moving some images (filenames are(1).PNG, (2).PNG and so on) from one directory to another. I am using the following code:
for (int i = 1; i < n; i++)
{
try
{
from = "E:\\vid\\...
24
votes
3
answers
23k
views
How do I fix the path of my local git repo after move?
How do I fix the path of my local git repo after move?
previous local location: /C/website
new local location: /C/Projects/website
remote location: [email protected]:username/website.git
I moved my ...
24
votes
2
answers
57k
views
How to move HTML element
How to move HTML element to another element. Note that, I don't mean moving element's position. Consider this HTML code:
<div id="target"></div>
<span id="to_be_moved"></span>
...
24
votes
2
answers
23k
views
Have you ever got this message when moving a file? mv: will not overwrite just-created
I have a bourne shell script which performs several tasks. One of these tasks is to move some files to certain directory. Today, when I ran the script I got the following message:
mv: will not ...
24
votes
2
answers
5k
views
Repeated std::move on an boost::asio socket object in C++11
I am exploring using boost::asio along with C++11 features. In particular, I am focusing on an example called "async_tcp_echo_server.cpp", located here (code is also shown at the end of my question):
...
24
votes
3
answers
158k
views
Batch file to move files to another directory
I hope that you can help me with this one. It might have been asked multiple times already (I know that), but for some reason, I just can't have it working.
I want to move some files from the "files" ...
24
votes
4
answers
4k
views
Using gitk to view the full history of a moved file
After much searching, I have not found a satisfactory method that is easy to use to view the complete history of a moved file in Git and more importantly in Gitk. Using git log --follow [filePath] and ...
21
votes
1
answer
1k
views
How do global consts that are not copy or clone work in Rust?
Say I have the following snippet (playground)
struct A {
pub val: u32
}
const GLOBAL_A: A = A {val: 2};
fn main() {
let some_a: A = GLOBAL_A;
let other_a: A = GLOBAL_A;
println!("...
21
votes
5
answers
20k
views
Conveniently move a class to a different package in eclipse without borking svn
When moving a file from old.package to new.package I want two things to happen:
Update all references to that class (in all files of the project) so that the new package is used
svn move old/package/...
19
votes
4
answers
19k
views
Android RecyclerView Duplicate Item When Scrolling
I have a problem in RecyclerView. When I move item in RV and then scroll, saw some items has duplicated.
19
votes
1
answer
86k
views
Moving entire folder and all its contents to another folder [duplicate]
Just need a batch script that will move one folder and all its contents into another folder.
Essentially this
C:\Folder1 to C:\Folder2\Folder 1
19
votes
1
answer
6k
views
Default move constructor and reference members
From [12.8] [11] of N3337:
The implicitly-defined copy/move constructor for a non-union class X performs a memberwise copy/move of its bases and members. [ Note: brace-or-equal-initializers of non-...
18
votes
8
answers
34k
views
Move window without border
How do I move a window that does not have a border. There is no empty space on the application, all that is available is a webbrowser and a menustrip. I would like the users to be able to move the ...
18
votes
2
answers
17k
views
Auto creating folders when using System.IO.File.Move
I'm updating an old winforms app which moves files to new locations using regex and System.IO.File.Move
Under windows 7, the old app worked fine. If a folder didn't exist, File.Move would create it
...
18
votes
3
answers
65k
views
how do i fix: 'access denied' with the move command in windows 7?
Hi there i'm using the windows 7 'move' command like so:
move /Y "C:\old.sub.folder\folder.i.want.to.move" "F:\new.sub.folder\folder.i.want.to.move"
and i keep getting an 'accessed denied' error yet ...
18
votes
2
answers
57k
views
mv: cannot overwrite directory with non-directory
Is it possible to get around this problem?
I have a situation where I need to move some files to 1 directory below.
/a/b/c/d/e/f/g
problem is that the filename inside g/ directory is the same as ...
18
votes
5
answers
15k
views
How does returning std::make_unique<SubClass> work?
I have a base class and its subclass:
class Base {
public:
virtual void hi() {
cout << "hi" << endl;
}
};
class Derived : public Base {
public:
void hi() ...
17
votes
4
answers
4k
views
To support move semantics, should function parameters be taken by unique_ptr, by value, or by rvalue?
One of my function takes a vector as a parameter and stores it as a member variable. I am using const reference to a vector as described below.
class Test {
public:
void someFunction(const std::...
17
votes
4
answers
33k
views
How to move a UIView programmatically in Swift
The issue is to move an "InfoView" (UIView) programmatically in Swift.
The following constraints exist in the storyboard (see image):
Now, I would like to move the "InfoView" inside "MyView" up or ...
17
votes
3
answers
35k
views
Gradle - Move a folder from ABC to XYZ
Directory Structure:
Project1/ABC/file1.txt
I want the above ABC folder moved/renamed to XYZ (without leaving ABC there).
How can I do this using Gradle. Seems like in Gradle: For a right hand ...
17
votes
2
answers
29k
views
Does std::move work with lvalue references? How does std::move work on standard containers?
#include <vector>
struct A { int a[100]; };
void foo (const A& a) {
std::vector<A> vA;
vA.push_back(std::move(a)); // how does move really happen?
}
int main () {
A a;
foo(...
17
votes
1
answer
9k
views
How to move (translate) an image by an offset of X, Y on imagemagick?
What's the command that will take an image, move / translate it by an offset of X,Y pixels and save the result?
17
votes
1
answer
2k
views
How do I return a non-movable (but copyable) object?
Edit: End goal: I want to make a container class that never uses move, even when it's available. NonMove is a class of test objects for that container.
I tried different variations, but GCC insists ...
16
votes
4
answers
31k
views
How can I add moving effects to my controls in C#?
I have a Panel In my C# form and I have a button. When I click on the Button the invisible Panel Shows. Instead of that I want the Panel to move in or slide in.
For example when you click on a ...
16
votes
4
answers
161k
views
Windows batch script to move files
I need to move files from one directory to another in windows, and I need to write this in a batch script.
We have written a SQL job where backup files will be created every 4 hours on the D: drive ...
16
votes
7
answers
18k
views
Moving multiple files with gsutil
Let's say I've got the following files in a Google Cloud Storage bucket:
file_A1.csv
file_B2.csv
file_C3.csv
Now I want to move a subset of these files, lets say file_A1.csv and file_B2.csv. ...
16
votes
2
answers
10k
views
Prevent a user from deleting, moving or renaming a file
What I am trying to do is while my program is using a file, I want to keep the user from renaming, deleting, or moving the file (well... a move is a delete and a create at a different location ...
16
votes
2
answers
6k
views
Appropriate way to forward rvalue reference
I have the following code:
#include <iostream>
#include <string>
using std::cout;
using std::endl;
void bar(const std::string& str)
{
cout << "const str - " <&...
16
votes
1
answer
3k
views
Why to use std::move despite the parameter is an r-value reference
I am confused about using std::move() in below code:
If I uncomment line at (2) the output would be: 1 2 3 but if I uncomment line at (1) output would be nothing which means that move constructor ...
16
votes
3
answers
694
views
How can I avoid wasteful copying of keys in a B-tree based STL-like map?
I'm replacing a use of std::map in a hot path with cpp-btree's btree_map. But with optimization enabled, GCC and Clang complain about a strict aliasing violation. The problem boils down to this:
...