move

Renaming Files after a move

寵の児 提交于 2019-12-13 04:20:56
问题 I'm trying to rename a file while it is being moved into an "old" folder using a .cmd file and a .php file. This file is being e-mailed in a batch job and then moved into the old folder with the previous month and current year at the end of the report. Right now: The files are being e-mail correctly, and moved into the old folder, however the file name is not being renamed when it enters the "old" folder. Can anyone make any suggestions to my code? I can't seem to find out where the error is.

Joomla, move whole site to different domain name

主宰稳场 提交于 2019-12-12 23:12:55
问题 I have a website built in joomla and it is live on the web at a url: http://oldsite.com I have been asked to move it to another url - domain name http://newsite.com How should I do this correctly without messing up the site and joomla installation?? 回答1: I did not find any references in Joomla to the domain that it is running under, so there should be no need to change anything. If the site name changes as well, update /configuration.php. In practice, you may find that there are links with

Move a file without releasing lock

℡╲_俬逩灬. 提交于 2019-12-12 17:14:05
问题 I am using Java NIO in spring batch application. The application looks in a directory (e.g. /shared/inbox) where /shared is network shared disk among all instances of applications running on different JVMs. To avoid multiple threads reading same files, in my ItemReader I take a FileLock and avoid other threads to read from it. While I am done reading, I want to move the file to another directory (e.g. /shared/archive). But the Files.move method cannot do that unless I give up the FileLocl,

c++11 Why doesn't this move constructor work?

南楼画角 提交于 2019-12-12 17:00:03
问题 I've written the code posted below. I was hoping to get to move the content of a vector between instances of LargeClass . The move constructor is being used, but instead of moving I get copies only. Why doesn't the move semantics work as expected here? Code: #include <iostream> #include <vector> class LargeClass { public: explicit LargeClass (void): numbers(20, 10) { } LargeClass (const LargeClass &rhs): numbers(rhs.numbers) { std::cout << "Using LargeClass copy constructor" << '\n'; }

is_move_constructible and msvc2013

天大地大妈咪最大 提交于 2019-12-12 15:15:25
问题 #include <iostream> #include <type_traits> struct Foo { Foo(Foo&& f) = delete; }; int main() { std::cout << std::is_move_constructible<Foo>::value; // output is 1 std::cin.ignore(); } Under msv2013 should I forgot something, or is there a bug ? APPENDUM: #include <iostream> #include <type_traits> struct Foo { ~Foo(){} }; int main() { std::cout << std::is_move_constructible<Foo>::value; std::cin.ignore(); } even with CTP this program produce an output of 1 (and c++ standard say the contrary),

Why is a condition_variable not MoveAssignable

隐身守侯 提交于 2019-12-12 12:46:52
问题 Why is a condition_variable not MoveConstructible (as per http://en.cppreference.com/w/cpp/thread/condition_variable)? That prohibits inclusion in lots of containers (eg. std::unordered_map ) that move things around. This forces people to use a unique_ptr which incurs one extra heap allocation, which things like make_shared were built to solve. Also if one doesn't have a pool allocator this can become quite inefficient. 回答1: condition_variable is a synchronization construct that multiple

Should I use pointers or move semantics for passing big chunks of data?

允我心安 提交于 2019-12-12 07:33:28
问题 I have a questions about recommended coding technique. I have a tool for model analysis and I sometimes need to pass a big amount of data (From a factory class to one that holds multiple heterogeneous chunks). My question is whether there is some consensus about if I should rather use pointers or move the ownership (I need to avoid copying when possible as the size of a data-block may be as big as 1 GB). The pointer version would look like this: class FactoryClass { ... public: static Data *

how to batch move files date filename folder?

随声附和 提交于 2019-12-12 06:12:52
问题 I have lots of image files named as YYYYMMDD_HHmm.jpg How can I move these files to: target_directory\YYYY\MM\YYYYMMDD_HHmm.jpg ? Thank you 回答1: You can use a for loop, substrings, and mkdir : @echo off setlocal enabledelayedexpansion for /f %%a in ('dir /b /a-d') do ( set filename=%%a ::exclude this file if not "!filename!" == "%~nx0" ( ::substr to grab characters 0-4 and 4-6 as year and month set year=!filename:~0,4! set month=!filename:~4,2! ::make dirs for the files if they don't already

Moving to a new domain and using the old one for a new website - how to handle 301 redirects?

有些话、适合烂在心里 提交于 2019-12-12 04:56:20
问题 I'm planning to move an old website to a new domain. Then, I would like to use the old domain with a completely brand new different website. So after the move there would be 2 different websites: Old website --> brandnewdomain.com New website --> olddomain.com The problem I'm having is that how can I 301 redirect all URLs from the old website to a new domain to keep the visitors flow from search engines and at the same time use the old domain with a new website? For example I can't 301

Batch to move folders that are 30 days old using FORFILES

蓝咒 提交于 2019-12-12 02:42:09
问题 I am currently working that moves ONLY folders from one directory to a folder. The current bacth file I have created is as follows. Set /p target=Select Target Destination: ForFiles /P "C:\Batch test" /D -4 /C "CMD /C if @ISDIR==TRUE echo Move @FILE %target%" &Move @File %target% pause The problem I have is with using a target directory that has a space in it for instance "C:\Move Test". I was wondering if there was a way to still move folders to another directory that has a space in the name