Batch - Copy file into a newly created directory












-1














I've written the following batch:



@echo off
set /p dname= Define Project Name
mkdir "%dname%1 Project Folder"
mkdir "%dname%2 Folder Two"
mkdir "%dname%3 Folder Three"
mkdir "%dname%4 Folder Four"
mkdir "%dname%5 Folder Five"
mkdir "%dname%6 Folder Six"


I've tried to write a code where a Adobe Premiere Project File (.prproj) is renamed (%dname%) and moved into the recently created directory: 1 Project Folder".



I'm trying to avoid fixed directory paths since I'm going to share it with other users



The untitled.prproj files gets renamed (%dname%) and moved into 01 Project Folder:










share|improve this question
























  • this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
    – Gerhard Barnard
    Nov 14 '18 at 11:46












  • @GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
    – TerminateBugs
    Nov 14 '18 at 12:00












  • and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
    – Gerhard Barnard
    Nov 14 '18 at 12:05












  • @GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
    – TerminateBugs
    Nov 14 '18 at 12:18






  • 1




    You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
    – Squashman
    Nov 14 '18 at 13:26
















-1














I've written the following batch:



@echo off
set /p dname= Define Project Name
mkdir "%dname%1 Project Folder"
mkdir "%dname%2 Folder Two"
mkdir "%dname%3 Folder Three"
mkdir "%dname%4 Folder Four"
mkdir "%dname%5 Folder Five"
mkdir "%dname%6 Folder Six"


I've tried to write a code where a Adobe Premiere Project File (.prproj) is renamed (%dname%) and moved into the recently created directory: 1 Project Folder".



I'm trying to avoid fixed directory paths since I'm going to share it with other users



The untitled.prproj files gets renamed (%dname%) and moved into 01 Project Folder:










share|improve this question
























  • this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
    – Gerhard Barnard
    Nov 14 '18 at 11:46












  • @GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
    – TerminateBugs
    Nov 14 '18 at 12:00












  • and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
    – Gerhard Barnard
    Nov 14 '18 at 12:05












  • @GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
    – TerminateBugs
    Nov 14 '18 at 12:18






  • 1




    You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
    – Squashman
    Nov 14 '18 at 13:26














-1












-1








-1







I've written the following batch:



@echo off
set /p dname= Define Project Name
mkdir "%dname%1 Project Folder"
mkdir "%dname%2 Folder Two"
mkdir "%dname%3 Folder Three"
mkdir "%dname%4 Folder Four"
mkdir "%dname%5 Folder Five"
mkdir "%dname%6 Folder Six"


I've tried to write a code where a Adobe Premiere Project File (.prproj) is renamed (%dname%) and moved into the recently created directory: 1 Project Folder".



I'm trying to avoid fixed directory paths since I'm going to share it with other users



The untitled.prproj files gets renamed (%dname%) and moved into 01 Project Folder:










share|improve this question















I've written the following batch:



@echo off
set /p dname= Define Project Name
mkdir "%dname%1 Project Folder"
mkdir "%dname%2 Folder Two"
mkdir "%dname%3 Folder Three"
mkdir "%dname%4 Folder Four"
mkdir "%dname%5 Folder Five"
mkdir "%dname%6 Folder Six"


I've tried to write a code where a Adobe Premiere Project File (.prproj) is renamed (%dname%) and moved into the recently created directory: 1 Project Folder".



I'm trying to avoid fixed directory paths since I'm going to share it with other users



The untitled.prproj files gets renamed (%dname%) and moved into 01 Project Folder:







windows batch-file cmd copy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 11:49









Armali

6,97093698




6,97093698










asked Nov 14 '18 at 11:35









TerminateBugs

1




1












  • this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
    – Gerhard Barnard
    Nov 14 '18 at 11:46












  • @GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
    – TerminateBugs
    Nov 14 '18 at 12:00












  • and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
    – Gerhard Barnard
    Nov 14 '18 at 12:05












  • @GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
    – TerminateBugs
    Nov 14 '18 at 12:18






  • 1




    You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
    – Squashman
    Nov 14 '18 at 13:26


















  • this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
    – Gerhard Barnard
    Nov 14 '18 at 11:46












  • @GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
    – TerminateBugs
    Nov 14 '18 at 12:00












  • and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
    – Gerhard Barnard
    Nov 14 '18 at 12:05












  • @GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
    – TerminateBugs
    Nov 14 '18 at 12:18






  • 1




    You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
    – Squashman
    Nov 14 '18 at 13:26
















this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
– Gerhard Barnard
Nov 14 '18 at 11:46






this is a little unclear, how do you want to dynamically determine what the project folder name will be in order to not accidently copy into any other folder? Also, you seem to want to rename the prject file to the value of %dname%, does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?
– Gerhard Barnard
Nov 14 '18 at 11:46














@GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
– TerminateBugs
Nov 14 '18 at 12:00






@GerhardBarnard "does that mean you want to both create a folder, create the relevant subfolders and then move the file from the root of where you created %dname% directory?" Yes almost. It has to copy (not move) the project file and then rename to whatever the %dname% is set to. It's just an empty project file ready to be double clicked on and start the video editing work.
– TerminateBugs
Nov 14 '18 at 12:00














and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
– Gerhard Barnard
Nov 14 '18 at 12:05






and there will only be 1 .prproj file in the root ditectory where the batch is? and will the main project folder exist already, or do we mkdir them?
– Gerhard Barnard
Nov 14 '18 at 12:05














@GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
– TerminateBugs
Nov 14 '18 at 12:18




@GerhardBarnard "and there will only be 1 .prproj file in the root ditectory where the batch is?" - Yes. "and will the main project folder exist already, or do we mkdir them?" - It will be mkdir (the 3rd line of the batch) mkdir "%dname%1 Project Folder"
– TerminateBugs
Nov 14 '18 at 12:18




1




1




You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
– Squashman
Nov 14 '18 at 13:26




You literally only needed to add one more line of code to your script and you didn't even attempt to write it.
– Squashman
Nov 14 '18 at 13:26












1 Answer
1






active

oldest

votes


















0














If I get your question 100% correctly:



@echo off
set myfolders="01 Project Folder","02 Folder Two","03 Folder Three","04 Folder Four","05 Folder Five","06 Folder Six"
set /p "dname=Define Project Name "
mkdir "%dname%" >nul
for %%i in (%myfolders%) do mkdir "%dname%%%~i" >nul
copy *.prproj "%dname%1 Project Folder%dname%.prproj"


We create the directory %dname% if not existing. Then create each subfolder, then simply copy the file to the project directory with the new name.






share|improve this answer



















  • 1




    That's exacly what I wanted :D Thank you very much!
    – TerminateBugs
    Nov 14 '18 at 12:31










  • Glad I could be of assistance
    – Gerhard Barnard
    Nov 14 '18 at 12:33











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299313%2fbatch-copy-file-into-a-newly-created-directory%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














If I get your question 100% correctly:



@echo off
set myfolders="01 Project Folder","02 Folder Two","03 Folder Three","04 Folder Four","05 Folder Five","06 Folder Six"
set /p "dname=Define Project Name "
mkdir "%dname%" >nul
for %%i in (%myfolders%) do mkdir "%dname%%%~i" >nul
copy *.prproj "%dname%1 Project Folder%dname%.prproj"


We create the directory %dname% if not existing. Then create each subfolder, then simply copy the file to the project directory with the new name.






share|improve this answer



















  • 1




    That's exacly what I wanted :D Thank you very much!
    – TerminateBugs
    Nov 14 '18 at 12:31










  • Glad I could be of assistance
    – Gerhard Barnard
    Nov 14 '18 at 12:33
















0














If I get your question 100% correctly:



@echo off
set myfolders="01 Project Folder","02 Folder Two","03 Folder Three","04 Folder Four","05 Folder Five","06 Folder Six"
set /p "dname=Define Project Name "
mkdir "%dname%" >nul
for %%i in (%myfolders%) do mkdir "%dname%%%~i" >nul
copy *.prproj "%dname%1 Project Folder%dname%.prproj"


We create the directory %dname% if not existing. Then create each subfolder, then simply copy the file to the project directory with the new name.






share|improve this answer



















  • 1




    That's exacly what I wanted :D Thank you very much!
    – TerminateBugs
    Nov 14 '18 at 12:31










  • Glad I could be of assistance
    – Gerhard Barnard
    Nov 14 '18 at 12:33














0












0








0






If I get your question 100% correctly:



@echo off
set myfolders="01 Project Folder","02 Folder Two","03 Folder Three","04 Folder Four","05 Folder Five","06 Folder Six"
set /p "dname=Define Project Name "
mkdir "%dname%" >nul
for %%i in (%myfolders%) do mkdir "%dname%%%~i" >nul
copy *.prproj "%dname%1 Project Folder%dname%.prproj"


We create the directory %dname% if not existing. Then create each subfolder, then simply copy the file to the project directory with the new name.






share|improve this answer














If I get your question 100% correctly:



@echo off
set myfolders="01 Project Folder","02 Folder Two","03 Folder Three","04 Folder Four","05 Folder Five","06 Folder Six"
set /p "dname=Define Project Name "
mkdir "%dname%" >nul
for %%i in (%myfolders%) do mkdir "%dname%%%~i" >nul
copy *.prproj "%dname%1 Project Folder%dname%.prproj"


We create the directory %dname% if not existing. Then create each subfolder, then simply copy the file to the project directory with the new name.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 14 '18 at 12:34

























answered Nov 14 '18 at 12:25









Gerhard Barnard

6,91631131




6,91631131








  • 1




    That's exacly what I wanted :D Thank you very much!
    – TerminateBugs
    Nov 14 '18 at 12:31










  • Glad I could be of assistance
    – Gerhard Barnard
    Nov 14 '18 at 12:33














  • 1




    That's exacly what I wanted :D Thank you very much!
    – TerminateBugs
    Nov 14 '18 at 12:31










  • Glad I could be of assistance
    – Gerhard Barnard
    Nov 14 '18 at 12:33








1




1




That's exacly what I wanted :D Thank you very much!
– TerminateBugs
Nov 14 '18 at 12:31




That's exacly what I wanted :D Thank you very much!
– TerminateBugs
Nov 14 '18 at 12:31












Glad I could be of assistance
– Gerhard Barnard
Nov 14 '18 at 12:33




Glad I could be of assistance
– Gerhard Barnard
Nov 14 '18 at 12:33


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299313%2fbatch-copy-file-into-a-newly-created-directory%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?