hexagon logo

Auto create folder script

So at my last shop we had a .bas file that would create folders. here is what i am doing.
What it used to do would create a folder for part number(if it didnt already exist) then each sub folder.

then i could use this same code in every program since it pulls in the part number, operation, serial, from a text file and assigns them a variable.






Parents
  • I've been updating the batch files we use to start pc-dmis and have discovered that the windows command shell "mkdir" (or md) has gotten really smart in windows 10.

    It'll create the entire path, or if a portion of the path exists, will add the rest. Long names and names with spaces require no special handling. It's awesome. If it doesn't work like this for you, may have to enable command extensions.

    So this could be handled by a very short batch file with the path passed to it

    Not sure when this change came about. our batch files were written in XP and haven't been changed much.
  • I think it has been like that for a long time - I remember recommending the 'mkdir' approach, as it is much easier than a Basic script, and will not suddenly error out just because a new version of PC-DMIS has been installed (there were a number of versions that had real problems with basic scripts in the first few 64-bit versions of PC-DMIS...).
Reply
  • I think it has been like that for a long time - I remember recommending the 'mkdir' approach, as it is much easier than a Basic script, and will not suddenly error out just because a new version of PC-DMIS has been installed (there were a number of versions that had real problems with basic scripts in the first few 64-bit versions of PC-DMIS...).
Children
No Data