Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
set var=\\dxbfs01\01_Exchange\J.Steeg\
mkdir %var%test
mkdir %var%test1
mkdir %var%test2this is a script that generates three folders but the problem is that Now the user of this script has to change manually the value of 'set var', . what i need is that the folders r to be generated where the script is executed.
please i need help it is urgent
sorry for disturbance
and thanks in advance

Maybe this will help:
:loop set /p var=Enter a path. For /f "delims=" %%a in ('2^>^&1 mkdir "%Var%"') do ( echo %%a goto loop )

If the user is able to type the value as command tail parameter
set var=%*
and run the script as e.g.
mybat \\dxbfs01\01_Exchange\J.Steeg\
or if you prefer an interactive solution
set /P var=Enter root name^>
In both case you need then to check input correctness.

sorry guys let me explain it in another way this bat file is simply generates 3 folder and it works good in its path // dbb....exchange // j.steeg
but the user want to take the bat file (copy and paste) fand use it in a new place this is the problem ..
thanks alot

shall it be like this if yes it is not woking ivo
set var=%cd%mkdir %var%test
mkdir %var%test1
mkdir %var%test2

set var=%cd%\
mkdir "%var%01_Creative_Brief_Amendment_Brief"
mkdir "%var%02_Qutoations_and_LPO´s"
mkdir "%var%03_Layouts"
mkdir "%var%04_Copy_Sheets"
mkdir "%var%05_Client_Presentations"mkdir "%var%06_Studio_Brief"
mkdir "%var%07_Final_PDFs"
mkdir "%var%08_Approvals"
mkdir "%var%09_Media_Plans"mkdir "%var%10_Other_Resources_(Client_Supplied_Info___Permits___etc)"
it is working on the desktop and other folders but not on the my server
pls help
thanks

Please, listen to me *carefully*, what you want to achieve is not fully clear to me (and to other guys too as the beginning of this thread showes). I have understood the script has to create the directories in the current one of the user. The %cd%\ is aimed to that.
I noticed however your original var starts with \\dxbfs01 i.e. a computer name. There is no way to automatically set this name that must be supplied in some way.
So report the error message you get and explain carefully your environment and target.
As a fast and blind hint replaceset var=%cd%\
with
set var=%cd%.\
to enable the creation on the root folder.

sorry ivo i knw u got bored of me srry
what i want is that i have 10 folder that i want them to generates when i double click the bat file. it is working on my desktop and on the c and d drives but not on my server \\dxbfs01 thats all :D:D
thats it when i try to run it on the server it doesnt do anything
thanks alot and sorry for distrubance

You do not bore me, I'm glad to help, but I have to understand...
Do you run the script on your server remotely?
The \\.... means an UNC address while the %cd% implies shared folders. What can I do to fix your error?

i didnt get it
i have a network that i want to put the bat file in it . so when the user double clicks it it generates the 10 folder

"each user does copy and paste the batch from the server to his/her folder and runs it inside the local folder"
Please confirm the above statement, but if so the script should do the job. If you trust in me contact me by mailing via the private message system so i can reply and eventually you send me the batch so I can examine it deeply.

i confirm the above statment but it is not working on the server
set var=%cd%.\
mkdir "%var%01_Creative_Brief_Amendment_Brief"
mkdir "%var%02_Qutoations_and_LPO´s"
mkdir "%var%03_Layouts"
mkdir "%var%04_Copy_Sheets"
mkdir "%var%05_Client_Presentations"mkdir "%var%06_Studio_Brief"
mkdir "%var%07_Final_PDFs"
mkdir "%var%08_Approvals"
mkdir "%var%09_Media_Plans"mkdir "%var%10_Other_Resources_(Client_Supplied_Info___Permits___etc)"
regarding the private msg it is not working
thanks

![]() |
Vb6.0 data reports
|
Unix help- sed or awk
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |