Copy directory structure only at year end
Happy New Year.
I have a solution to this, but I can't make it work unless I am in the directory I want to copy.
At the end of 2018, I want to copy the directory structure only of various folders named 2018/ into 2019/.
cd 2018/
find . -type d -exec mkdir -p ../2019/{} ;
And this works.
How do I do it from the base directory?
find 2018 -type d -exec basename {} ;
gives me the folder names, but
find 2018 -type d -exec mkdir 2019/`basename {}` ;
still copies the 2018 folder into the 2019 folder, and you loose the directory tree.
I can't find a simple answer after multiple searches. Any ideas?
Edit
Thanks for all the help and suggestions. This one ultimately worked best for me:
find 2018/* -type d | sed 's/^2018//g' | xargs -I {} mkdir -p 2019"/{}"
linux bash unix
add a comment |
Happy New Year.
I have a solution to this, but I can't make it work unless I am in the directory I want to copy.
At the end of 2018, I want to copy the directory structure only of various folders named 2018/ into 2019/.
cd 2018/
find . -type d -exec mkdir -p ../2019/{} ;
And this works.
How do I do it from the base directory?
find 2018 -type d -exec basename {} ;
gives me the folder names, but
find 2018 -type d -exec mkdir 2019/`basename {}` ;
still copies the 2018 folder into the 2019 folder, and you loose the directory tree.
I can't find a simple answer after multiple searches. Any ideas?
Edit
Thanks for all the help and suggestions. This one ultimately worked best for me:
find 2018/* -type d | sed 's/^2018//g' | xargs -I {} mkdir -p 2019"/{}"
linux bash unix
1
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48
add a comment |
Happy New Year.
I have a solution to this, but I can't make it work unless I am in the directory I want to copy.
At the end of 2018, I want to copy the directory structure only of various folders named 2018/ into 2019/.
cd 2018/
find . -type d -exec mkdir -p ../2019/{} ;
And this works.
How do I do it from the base directory?
find 2018 -type d -exec basename {} ;
gives me the folder names, but
find 2018 -type d -exec mkdir 2019/`basename {}` ;
still copies the 2018 folder into the 2019 folder, and you loose the directory tree.
I can't find a simple answer after multiple searches. Any ideas?
Edit
Thanks for all the help and suggestions. This one ultimately worked best for me:
find 2018/* -type d | sed 's/^2018//g' | xargs -I {} mkdir -p 2019"/{}"
linux bash unix
Happy New Year.
I have a solution to this, but I can't make it work unless I am in the directory I want to copy.
At the end of 2018, I want to copy the directory structure only of various folders named 2018/ into 2019/.
cd 2018/
find . -type d -exec mkdir -p ../2019/{} ;
And this works.
How do I do it from the base directory?
find 2018 -type d -exec basename {} ;
gives me the folder names, but
find 2018 -type d -exec mkdir 2019/`basename {}` ;
still copies the 2018 folder into the 2019 folder, and you loose the directory tree.
I can't find a simple answer after multiple searches. Any ideas?
Edit
Thanks for all the help and suggestions. This one ultimately worked best for me:
find 2018/* -type d | sed 's/^2018//g' | xargs -I {} mkdir -p 2019"/{}"
linux bash unix
linux bash unix
edited Jan 5 at 15:53
smilingfrog
asked Jan 1 at 18:59
smilingfrogsmilingfrog
465
465
1
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48
add a comment |
1
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48
1
1
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48
add a comment |
3 Answers
3
active
oldest
votes
This like should do the trick:
for FOLDER in `ls -l 2018/|grep '^d'|awk '{print $9}'`; do mkdir -p 2019/$FOLDER; done
OR
for FOLDER in `find 2018 -type d -exec basename {} ;|grep -v 2018`; do mkdir -p 2019/$FOLDER; done
I hope this helps.
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
Why you shouldn't parse the output ofls
.
– Kamil Maciorowski
Jan 2 at 22:45
add a comment |
If you have mtree, you can do this:
$ mkdir 2019
$ mtree -cdp 2018 | mtree -Up 2019
If you don't have mtree, here's how to install Archie Cobbs' mtree port from GitHub on Ubuntu 16.04.5 LTS:
$ mkdir work; cd work
$ # adjust this URL to match the desired version from the GitHub page
$ wget https://s3.amazonaws.com/archie-public/mtree-port/mtree-1.0.4.tar.gz
$ tar xf mtree-1.0.4.tar.gz
$ cd mtree-1.0.4
$ cat README
mtree - Utility for creating and verifying file hierarchies
This is a port of the BSD mtree(1) utility.
See INSTALL for installation instructions.
See COPYING for license.
See CHANGES for change history.
Enjoy!
$ cat INSTALL
Simplified instructions:
1. Ensure you have the following software packages installed:
libopenssl-devel
2. ./configure && make && sudo make install
Please see
https://github.com/archiecobbs/mtree-port
for more information.
$ # I already had openssl installed in my Ubuntu VM, so I forged ahead:
$ ./configure
...
$ make
...
$ sudo make install
$ man mtree
...
$ which mtree
/usr/bin/mtree
I think the OpenSSL package name mentioned by the author may have changed since the instructions were created. On my system, libssl-dev was the package I needed to build mtree with SHA256 etc. support.
HTH,
Jim
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
add a comment |
Just:
cd 2018/
find * -type d -exec mkdir -p ../2019/{} ;
using the '*' instead of '.' will avoid selecting the 2018 directory itself.
Without cd-ing to directory, I would get the directories list into an array and substitute the year in mkdir command. For example:
# get list into an array, names can have spaces.
IFS=$'rn' dirs=($(find /some/path/2018/* -type d))
let i=0
while [ $i -lt ${#dirs[*]} ]; do
mkdir -p "${dirs[$i]/2018/2019}"
let i=i+1
done
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389580%2fcopy-directory-structure-only-at-year-end%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
This like should do the trick:
for FOLDER in `ls -l 2018/|grep '^d'|awk '{print $9}'`; do mkdir -p 2019/$FOLDER; done
OR
for FOLDER in `find 2018 -type d -exec basename {} ;|grep -v 2018`; do mkdir -p 2019/$FOLDER; done
I hope this helps.
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
Why you shouldn't parse the output ofls
.
– Kamil Maciorowski
Jan 2 at 22:45
add a comment |
This like should do the trick:
for FOLDER in `ls -l 2018/|grep '^d'|awk '{print $9}'`; do mkdir -p 2019/$FOLDER; done
OR
for FOLDER in `find 2018 -type d -exec basename {} ;|grep -v 2018`; do mkdir -p 2019/$FOLDER; done
I hope this helps.
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
Why you shouldn't parse the output ofls
.
– Kamil Maciorowski
Jan 2 at 22:45
add a comment |
This like should do the trick:
for FOLDER in `ls -l 2018/|grep '^d'|awk '{print $9}'`; do mkdir -p 2019/$FOLDER; done
OR
for FOLDER in `find 2018 -type d -exec basename {} ;|grep -v 2018`; do mkdir -p 2019/$FOLDER; done
I hope this helps.
This like should do the trick:
for FOLDER in `ls -l 2018/|grep '^d'|awk '{print $9}'`; do mkdir -p 2019/$FOLDER; done
OR
for FOLDER in `find 2018 -type d -exec basename {} ;|grep -v 2018`; do mkdir -p 2019/$FOLDER; done
I hope this helps.
edited Jan 2 at 18:24
smilingfrog
465
465
answered Jan 2 at 14:06
Manuel FlorianManuel Florian
1595
1595
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
Why you shouldn't parse the output ofls
.
– Kamil Maciorowski
Jan 2 at 22:45
add a comment |
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
Why you shouldn't parse the output ofls
.
– Kamil Maciorowski
Jan 2 at 22:45
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
The first version works; thanks. The second does not, as it collapses the tree structure, and puts all the subdirectories into 2019/.
– smilingfrog
Jan 2 at 17:38
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
It's weird the second option didn't work as it works for me. Anyways I'm glad it worked for you. Please mask the answer as correct so it can help others.
– Manuel Florian
Jan 2 at 19:13
2
2
Why you shouldn't parse the output of
ls
.– Kamil Maciorowski
Jan 2 at 22:45
Why you shouldn't parse the output of
ls
.– Kamil Maciorowski
Jan 2 at 22:45
add a comment |
If you have mtree, you can do this:
$ mkdir 2019
$ mtree -cdp 2018 | mtree -Up 2019
If you don't have mtree, here's how to install Archie Cobbs' mtree port from GitHub on Ubuntu 16.04.5 LTS:
$ mkdir work; cd work
$ # adjust this URL to match the desired version from the GitHub page
$ wget https://s3.amazonaws.com/archie-public/mtree-port/mtree-1.0.4.tar.gz
$ tar xf mtree-1.0.4.tar.gz
$ cd mtree-1.0.4
$ cat README
mtree - Utility for creating and verifying file hierarchies
This is a port of the BSD mtree(1) utility.
See INSTALL for installation instructions.
See COPYING for license.
See CHANGES for change history.
Enjoy!
$ cat INSTALL
Simplified instructions:
1. Ensure you have the following software packages installed:
libopenssl-devel
2. ./configure && make && sudo make install
Please see
https://github.com/archiecobbs/mtree-port
for more information.
$ # I already had openssl installed in my Ubuntu VM, so I forged ahead:
$ ./configure
...
$ make
...
$ sudo make install
$ man mtree
...
$ which mtree
/usr/bin/mtree
I think the OpenSSL package name mentioned by the author may have changed since the instructions were created. On my system, libssl-dev was the package I needed to build mtree with SHA256 etc. support.
HTH,
Jim
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
add a comment |
If you have mtree, you can do this:
$ mkdir 2019
$ mtree -cdp 2018 | mtree -Up 2019
If you don't have mtree, here's how to install Archie Cobbs' mtree port from GitHub on Ubuntu 16.04.5 LTS:
$ mkdir work; cd work
$ # adjust this URL to match the desired version from the GitHub page
$ wget https://s3.amazonaws.com/archie-public/mtree-port/mtree-1.0.4.tar.gz
$ tar xf mtree-1.0.4.tar.gz
$ cd mtree-1.0.4
$ cat README
mtree - Utility for creating and verifying file hierarchies
This is a port of the BSD mtree(1) utility.
See INSTALL for installation instructions.
See COPYING for license.
See CHANGES for change history.
Enjoy!
$ cat INSTALL
Simplified instructions:
1. Ensure you have the following software packages installed:
libopenssl-devel
2. ./configure && make && sudo make install
Please see
https://github.com/archiecobbs/mtree-port
for more information.
$ # I already had openssl installed in my Ubuntu VM, so I forged ahead:
$ ./configure
...
$ make
...
$ sudo make install
$ man mtree
...
$ which mtree
/usr/bin/mtree
I think the OpenSSL package name mentioned by the author may have changed since the instructions were created. On my system, libssl-dev was the package I needed to build mtree with SHA256 etc. support.
HTH,
Jim
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
add a comment |
If you have mtree, you can do this:
$ mkdir 2019
$ mtree -cdp 2018 | mtree -Up 2019
If you don't have mtree, here's how to install Archie Cobbs' mtree port from GitHub on Ubuntu 16.04.5 LTS:
$ mkdir work; cd work
$ # adjust this URL to match the desired version from the GitHub page
$ wget https://s3.amazonaws.com/archie-public/mtree-port/mtree-1.0.4.tar.gz
$ tar xf mtree-1.0.4.tar.gz
$ cd mtree-1.0.4
$ cat README
mtree - Utility for creating and verifying file hierarchies
This is a port of the BSD mtree(1) utility.
See INSTALL for installation instructions.
See COPYING for license.
See CHANGES for change history.
Enjoy!
$ cat INSTALL
Simplified instructions:
1. Ensure you have the following software packages installed:
libopenssl-devel
2. ./configure && make && sudo make install
Please see
https://github.com/archiecobbs/mtree-port
for more information.
$ # I already had openssl installed in my Ubuntu VM, so I forged ahead:
$ ./configure
...
$ make
...
$ sudo make install
$ man mtree
...
$ which mtree
/usr/bin/mtree
I think the OpenSSL package name mentioned by the author may have changed since the instructions were created. On my system, libssl-dev was the package I needed to build mtree with SHA256 etc. support.
HTH,
Jim
If you have mtree, you can do this:
$ mkdir 2019
$ mtree -cdp 2018 | mtree -Up 2019
If you don't have mtree, here's how to install Archie Cobbs' mtree port from GitHub on Ubuntu 16.04.5 LTS:
$ mkdir work; cd work
$ # adjust this URL to match the desired version from the GitHub page
$ wget https://s3.amazonaws.com/archie-public/mtree-port/mtree-1.0.4.tar.gz
$ tar xf mtree-1.0.4.tar.gz
$ cd mtree-1.0.4
$ cat README
mtree - Utility for creating and verifying file hierarchies
This is a port of the BSD mtree(1) utility.
See INSTALL for installation instructions.
See COPYING for license.
See CHANGES for change history.
Enjoy!
$ cat INSTALL
Simplified instructions:
1. Ensure you have the following software packages installed:
libopenssl-devel
2. ./configure && make && sudo make install
Please see
https://github.com/archiecobbs/mtree-port
for more information.
$ # I already had openssl installed in my Ubuntu VM, so I forged ahead:
$ ./configure
...
$ make
...
$ sudo make install
$ man mtree
...
$ which mtree
/usr/bin/mtree
I think the OpenSSL package name mentioned by the author may have changed since the instructions were created. On my system, libssl-dev was the package I needed to build mtree with SHA256 etc. support.
HTH,
Jim
edited Jan 4 at 18:36
answered Jan 3 at 0:49
Jim L.Jim L.
1565
1565
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
add a comment |
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
I can't see how to install mtree on ubuntu.
– smilingfrog
Jan 3 at 19:04
1
1
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
@smilingfrog I located Archie Cobbs' GitHub project to port mtree to Linux, and updated my answer with instructions for installation on Ubuntu 16.
– Jim L.
Jan 3 at 19:57
add a comment |
Just:
cd 2018/
find * -type d -exec mkdir -p ../2019/{} ;
using the '*' instead of '.' will avoid selecting the 2018 directory itself.
Without cd-ing to directory, I would get the directories list into an array and substitute the year in mkdir command. For example:
# get list into an array, names can have spaces.
IFS=$'rn' dirs=($(find /some/path/2018/* -type d))
let i=0
while [ $i -lt ${#dirs[*]} ]; do
mkdir -p "${dirs[$i]/2018/2019}"
let i=i+1
done
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
add a comment |
Just:
cd 2018/
find * -type d -exec mkdir -p ../2019/{} ;
using the '*' instead of '.' will avoid selecting the 2018 directory itself.
Without cd-ing to directory, I would get the directories list into an array and substitute the year in mkdir command. For example:
# get list into an array, names can have spaces.
IFS=$'rn' dirs=($(find /some/path/2018/* -type d))
let i=0
while [ $i -lt ${#dirs[*]} ]; do
mkdir -p "${dirs[$i]/2018/2019}"
let i=i+1
done
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
add a comment |
Just:
cd 2018/
find * -type d -exec mkdir -p ../2019/{} ;
using the '*' instead of '.' will avoid selecting the 2018 directory itself.
Without cd-ing to directory, I would get the directories list into an array and substitute the year in mkdir command. For example:
# get list into an array, names can have spaces.
IFS=$'rn' dirs=($(find /some/path/2018/* -type d))
let i=0
while [ $i -lt ${#dirs[*]} ]; do
mkdir -p "${dirs[$i]/2018/2019}"
let i=i+1
done
Just:
cd 2018/
find * -type d -exec mkdir -p ../2019/{} ;
using the '*' instead of '.' will avoid selecting the 2018 directory itself.
Without cd-ing to directory, I would get the directories list into an array and substitute the year in mkdir command. For example:
# get list into an array, names can have spaces.
IFS=$'rn' dirs=($(find /some/path/2018/* -type d))
let i=0
while [ $i -lt ${#dirs[*]} ]; do
mkdir -p "${dirs[$i]/2018/2019}"
let i=i+1
done
edited Jan 3 at 14:04
answered Jan 2 at 12:07
tonioctonioc
66736
66736
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
add a comment |
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
+1 for find *; I didn't know that was an option. However, this does the same as my working script, and I am trying to figure out how to do it without changing into the directory.
– smilingfrog
Jan 2 at 17:23
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
just added a way to achieve this.
– tonioc
Jan 3 at 14:04
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389580%2fcopy-directory-structure-only-at-year-end%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Take a look if this helps stackoverflow.com/questions/4073969/…
– Paulo
Jan 4 at 12:59
Thanks @Paulo: that has the one line answer I'm looking for. stackoverflow.com/a/30646398/2709804
– smilingfrog
Jan 5 at 15:48