cmd - create batch script file with user prompt and xcopy -


i'm trying create batch script file administrative assistant in work group. let's call him john.

john receives many cds daily clients containing architectural drawings pdfs. each cd unique. john assigns application number, , creates new folder on network drive application number folder name. john copies files on cd newly created folder name. repeats process every cd receives.

i don't have programming experience hope can lend me hand. here's wrote below it's not working. "insufficient memory" error. new folder name based on user input correctly created on network drive path it's empty.

thanks help! fyi, i'm running windows 7 64-bit

@echo off echo welcome team member! pause set /p anumber=type in application number press enter key when done.  mkdir "s:\arch\active forms , files\submittal floor plans\%anumber%\" :: e:\ cd drive path set source=e:\ :: s:\ network drive set destination="s:\arch\active forms , files\submittal floor plans\%anumber%\" xcopy %source%\* %destination%\* /s /e /l /h /i >nul  pause exit 

you setting variable %source% e:\ read interpreter e:\\* when used in %source%\*, leading invalid directory. same being done %destination% variable.

updated script:

@echo off set "networkfolder=s:\arch\active forms , files\submittal floor plans" set "cddrive=e:"  echo welcome team member! :input     set "applicationno="     set /p "applicationno=enter application number , press enter: "     if not defined applicationno goto :input     set "newlocation=%networkfolder%\%applicationno%" :actions     md "%newlocation%"     xcopy %cddrive%\* "%newlocation%" /s /e /i /h>nul   echo completed! pause 

Comments