Answer the question
In order to leave comments, you need to log in
Bat script (or another way) to create a new folder when the folder name is specified in the request to the script via a link?
Friends, help me cope with the task
What is:
There is an order database (Excel document), in one of the cells there is a link to the address of the folder of a specific order (for example D: \ Base \ 122 )
The number is taken from cell A1 =ГИПЕРССЫЛКА("D:\База\"&A1; 1)
Question:
How to make it so that when you click on a link in an Excel document in the directory D: \ Base \, a folder was created with the number specified in this link.
My fantasies about this:
Put in D: \ Base \ bat-file that can create folders with the name with which it is asked, and register the link as a link to a bat-file indicating the desired name of the new folder in it, for example: D:\База\newfolder.bat -122
Then in Excel like this:
=ГИПЕРССЫЛКА("D:\База\newfolder.bat -"&A1; 1)
Answer the question
In order to leave comments, you need to log in
@SET SOMEPREFIX_BASEDIR=K:\BASE
@MKDIR %SOMEPREFIX_BASEDIR%\%1
@IF NOT EXIST %SOMEPREFIX_BASEDIR%\%1 PING -n 10 127.0.0.1 > NUL
newfolder.bat 100
Read about visual basic/javascript scripting (windows scripting host) outside and inside excel and don't write frank garbage from a pile of batch files, excels, etc. By the way, this is already an outdated method, the mainstream is powershell. And if absolutely correct, write an application in .net c#/vb#/f#/...#.
bat language is completely unsuitable for working with excell,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question