copy

Powershell - copy files to different destination folders based on file names

不问归期 提交于 2019-12-10 23:15:37
问题 Dear Powershell Gurus, I have a few thousands of files in a folder called C:\Downloads\Signs. The files are named with their dimensions such as 13X20 abcdjd.psf, 8X20 jdscnjfc.psf, 14X24 dje.psf etc. What I want to do is to move these files to destination folders created within the C:\Downloads\Signs and the folder names are the dimensions of the file names. Example the folder names will be 13X20, 8X20, 14X24 etc and it depends upon as many unique file names with their dimensions. So, instead

Vbscript - Compare and copy files from folder if newer than destination files

戏子无情 提交于 2019-12-10 23:12:36
问题 I'm trying to design this script that's supposed to be used as a part of a logon script for alot of users. And this script is basically supposed to take a source folder and destination folder as basically just make sure that the destination folder has the exact same content as the source folder. But only copy if the datemodified stamp of the source file is newer than the destination file. I have been thinking out this basic pseudo code, just trying to make sure this is valid and solid

copy() function doesn't work

﹥>﹥吖頭↗ 提交于 2019-12-10 22:57:10
问题 I have task to copy my file from a folder to the current one. But when I perform this I get the following error: Warning: copy(C:/wamp/www/dfms/) [function.copy]: failed to open stream: Permission denied in C:\wamp\www\dfms\docShow.php on line 646 The code is given below if (copy('images/uploads/'.$doclisting['docfile_name'], 'C:/wamp/www/dfms/')) { echo "Pranav"; } I also tried by using chmod 0777 but still it gives me same error 回答1: Have you tried adding the filename to the destination?

XSLT 1.0: copy everything except certain nodes according to value and variable

五迷三道 提交于 2019-12-10 22:45:08
问题 I have the following (simplified) XML that I get in a system environment: <?xml version="1.0" encoding="UTF-8"?> <root> <IS_LOG> <USER>19291</USER> <DATE>2011-08-15</DATE> <TIME>15:36:36</TIME> <SYST>sy1</SYST> <MATERIALS> <item> <sy>100</sy> <mat>000000000000310000</mat> </item> <item> <sy>100</sy> <mat>000000000000491078</mat> </item> </MATERIALS> </IS_LOG> </root> The system that I work with passes me a variable at runtime that is not included in the XML structure above. I have the

how to deepcopy a queue in python

流过昼夜 提交于 2019-12-10 22:12:50
问题 Hi How to deepcopy a Queue in python? Thanks 回答1: The queue module in Python is used for synchronizing shared data between threads. It is not intended as a data structure and it doesn't support copying (not even shallow copy). (It is possible to construct many deepcopy's of a Queue by .get and .put , but the original Queue will be destroyed.) If you want to have a queue (or stack) as a data structure, use a collections.deque. If you want a priority queue, use the heapq module. The deque

Moving repo to another computer

怎甘沉沦 提交于 2019-12-10 20:35:00
问题 I've moved a repo from computer A to computer B. I've verified that the commits waiting to be pushed are still there on B, but the whole repo (every single file) is unstaged. I don't want to add them and push them as a commit because I have not changed every single file from when I copied the repo till I pasted it. When I moved the repo it only had the commits pending to be pushed, not changes. I have seen this question, but it didn't help with this. 回答1: On the copied repo folder of computer

C# File.Copy source and destination folders requiere different user rights

女生的网名这么多〃 提交于 2019-12-10 20:18:48
问题 I have an application that copies files that could be located anywhere on the local hard drive to a directory on a network share. The network directory is only accessible for a special domain account. I generally solved the problem by using an Impersonator-Class in this way: using(new MyImpersonator() { File.Copy(source, destination); } But this causes problems when I want to copy a file from a special directory, for example the Windwos-Dektop. Then I get an UnauthorizedAccessException

copy constructors and base classes C++

蓝咒 提交于 2019-12-10 19:29:57
问题 I'd like to be able to initialize a derived class from a base class, like so: class X { public: X() : m(3) {} int m; }; class Y : public X { public: Y() {} Y(const & X a) : X(a) {} }; Is there anything dangerous or unusual by doing that? I want it because I'm deserializing a bunch of objects who's type I don't immediately know, so I basically want to use X just as some temp storage while I'm reading the whole serialized file, and then create my Y objects (and W, X, Y objs, depending on the

What is the run time of String.toCharArray()?

六眼飞鱼酱① 提交于 2019-12-10 18:35:27
问题 What's the run time of String.toCharArray() in java? The source code is public char[] toCharArray() { // Cannot use Arrays.copyOf because of class initialization order issues char result[] = new char[value.length]; System.arraycopy(value, 0, result, 0, value.length); return result; } Does System.arrayCopy ? have run time of O(n)? The source code doesn't really say much about how it's implemented. Does it go through every element and copies it? Thanks. 回答1: System.arraycopy() is typically an

Objective-C Copying a view

橙三吉。 提交于 2019-12-10 18:06:27
问题 So I've got a quick question here... I've got an instance of a view controller object, lets call it viewCon1 , and it has several subview's placed on it each with unique properties. Lets call them sub1 , sub2 , and sub3 . Now, I add each of these subviews programatically doing something to the extent of: //create the subviews TaskUIButton *sub1 = [[TaskUIButton alloc] init]; TaskUIButton *sub2 = [[TaskUIButton alloc] init]; TaskUIButton *sub3 = [[TaskUIButton alloc] init]; //add them to