Jump to content

Recommended Posts

Guest PDC_MEM
Posted

Hello

 

I have a simple cmd file that creates folders in a specific shared drive based on prompts entered. One of the folders created contains a number that is incremented each time it is run.

 

It runs fine in win explorer , but when saved as a shortcut to the desktop to allow it to run from the task bar, it no longer will pick up the number. Below is the file:

 

'create new folders

 

SET initDir=G:\New_Folder

SET newDir=

SET /P newjob=Type Job name: %=%

SET /P newDesc=Type Description name: %=%

SET /P newLocat=Type Location: %=%

 

cd "G:\Estimating Templates\"

for /f %%x in (Count.txt) do (set /a var=%%x+1)

>Count.txt echo %var%

 

 

IF DEFINED newDir (md O:\"%newjob% - %newDesc% - %newLocat%"

SET initDir=%initDir%\"%newjob% - %newDesc% - %newLocat%" )

 

 

md O:\"%newjob% - %newDesc% - %newLocat%"\Bidders

md O:\"%newjob% - %newDesc% - %newLocat%\~%var% "

 

md O:\"%newjob% - %newDesc% - %newLocat%"\Close_Outs

md O:\"%newjob% - %newDesc% - %newLocat%"\Drawings

md O:\"%newjob% - %newDesc% - %newLocat%"\Drawings\"Original Drawings"

md O:\"%newjob% - %newDesc% - %newLocat%"\Flooring

md O:\"%newjob% - %newDesc% - %newLocat%"\"Forms and Exhibits"

md O:\"%newjob% - %newDesc% - %newLocat%"\Specs

 

md O:\"%newjob% - %newDesc% - %newLocat%"\Submittals

md O:\"%newjob% - %newDesc% - %newLocat%"\Submittals\Painting

md O:\"%newjob% - %newDesc% - %newLocat%"\Submittals\Flooring

md O:\"%newjob% - %newDesc% - %newLocat%"\Submittals\Ceramic

md O:\"%newjob% - %newDesc% - %newLocat%"\Submittals\Resinous_Terrazzo

 

 

 

%SystemRoot%\explorer.exe O:\"%newjob% - %newDesc% - %newLocat%"

 

 

Thank you!

 

Mary

 

More...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...