making folder from CNC program names?
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
making folder from CNC program names?
Hello, newbie here although I did work with TC quite a long time ago.
I am a CNC machine programmer and work in a shop in Poughkeepsie N.Y.. I have an ongoing
Project that I thought TC could help me with and so far it has to an extent but it is slow going.
We have thousands of programs previously written by another programmer that I need to convert
too folders. The programs have names such as 121-00-00-9014 R00 OP1. I would like to convert them
too folders and name them as follows 121-00-00-9014, leaving off the ROO OP1. I have found a way to
do this in TC, but only one at a time, I am looking for a faster way. I am not a computer programmer and do
not know computer code and cannot write custom macros. If there is anyway to do this and someone could
give a shout out I would greatly appreciate it.
Thank You
Jerry Dragon
I am a CNC machine programmer and work in a shop in Poughkeepsie N.Y.. I have an ongoing
Project that I thought TC could help me with and so far it has to an extent but it is slow going.
We have thousands of programs previously written by another programmer that I need to convert
too folders. The programs have names such as 121-00-00-9014 R00 OP1. I would like to convert them
too folders and name them as follows 121-00-00-9014, leaving off the ROO OP1. I have found a way to
do this in TC, but only one at a time, I am looking for a faster way. I am not a computer programmer and do
not know computer code and cannot write custom macros. If there is anyway to do this and someone could
give a shout out I would greatly appreciate it.
Thank You
Jerry Dragon
What do you mean by converting a program to folder? Please provide more details...
If you need to rename multiple files (maybe with moving them to subfolders), you can use Multi-Rename tool, you only need to select all files and open it from File menu.
Name parts with constant length may be selected using N#-# button, or you can use search and replace feature if you need to select name part before first space.
If you need to rename multiple files (maybe with moving them to subfolders), you can use Multi-Rename tool, you only need to select all files and open it from File menu.
Name parts with constant length may be selected using N#-# button, or you can use search and replace feature if you need to select name part before first space.
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
let me try again. These programs are basic "G" code files for CNC machines and can be either extension, .txt or .nc. So, I guess they are just basic .txt files named by the part number. So the G code file, part number 121-00-00-9014 , Revision 00, First Operation, would be named 121-00-00-9014 R00 OP1.txt or .nc. I want to take the first fourteen characters which is 121-00-00-9014 and make a folder with that name. I can do that now by highlighting the program name and then the quick key for create folder, then erase the last section. I can only do one at a time and have to erase the last section each time. I am looking for a way to do this quicker. This way I can put separate folders inside those folders for my solid drawing, my blueprint, my G code program, my mastercam program and my set up instructions and have access to them from all one place. At this point in time I am running all over the network gathering these different files when I need to produce certain parts.
You can use "Multi-Rename tool" for this.
Select all files and choose "Multi-Rename Tool" from "Files" menu (or just press CTRL+M on your keyboard).
Type
[N]\[N]
in "Rename mask:file name" combobox
[E]
in "Extension" combobox
and press "Start".
Note that all files are now in subfolders with names based on their names (without extension).
If you need your files to be in initial location choose again "Multi-Rename tool" and press "Undo" button - files will be moved back to previous location but newly created folders will be not deleted.
If your files are in different folders switch to Branch View before invoke "Multi-Rename tool" (press CTRL+B for all subfolders or CTRL+SHIFT+B for selected folders only) OR search all desired files - press ALT+F7, type appropriate names, while search will be completed press "Feed to listbox" on search dialog window.
Note that in this case new folders will be created in locations related to location of files.
Select all files and choose "Multi-Rename Tool" from "Files" menu (or just press CTRL+M on your keyboard).
Type
[N]\[N]
in "Rename mask:file name" combobox
[E]
in "Extension" combobox
and press "Start".
Note that all files are now in subfolders with names based on their names (without extension).
If you need your files to be in initial location choose again "Multi-Rename tool" and press "Undo" button - files will be moved back to previous location but newly created folders will be not deleted.
If your files are in different folders switch to Branch View before invoke "Multi-Rename tool" (press CTRL+B for all subfolders or CTRL+SHIFT+B for selected folders only) OR search all desired files - press ALT+F7, type appropriate names, while search will be completed press "Feed to listbox" on search dialog window.
Note that in this case new folders will be created in locations related to location of files.
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
If I understand correctly, what I would get by doing this would be taking theMVV wrote:As I see it, dragonworks wants only first 14 characters of file names to be folder names, so template [N1-14]\[N] should be better - it will move all "121-00-00-9014 *.txt" items to the "121-00-00-9014" subfolder.
121-00-00-9014 R00 OP1.TXT file, creating a folder titled 121-00-00-9014 and it would import any files titled 121-00-00-9014*.txt into it, all in one step. I can always come back and import the .TXT files into the new folder if necessary.
If so, I think you got it. Is there any way I can do this to multiple .txt files at the same time. I have thousands of files that I want to make folder names out of. Is there anyway to upload pictures here? I could take screen shots or .png files and give you a visual, they say a picture is worth a thousand words.
Thank You All
Jerry D.
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
This is what what I have now.
A folder titled 121
Inside that folder I have programs such as
121-00-00-9014 R00 OP1.TXT
121-00-00-9014 R00 OP2.TXT
121-00-00-9014 R00 OP3.TXT
121-25-25-9026 R01 OP1.TXT
121-25-25-9026 R01 OP2.TXT
121-25-25-9026 R01 OP3.TXT
121-25-25-9026 R01 OP4.TXT
121-25-50-1622 R00 OP1.TXT
121-25-50-1622 R00 OP2.TXT
so on and so on
A folder titled 121
Inside that folder I have programs such as
121-00-00-9014 R00 OP1.TXT
121-00-00-9014 R00 OP2.TXT
121-00-00-9014 R00 OP3.TXT
121-25-25-9026 R01 OP1.TXT
121-25-25-9026 R01 OP2.TXT
121-25-25-9026 R01 OP3.TXT
121-25-25-9026 R01 OP4.TXT
121-25-50-1622 R00 OP1.TXT
121-25-50-1622 R00 OP2.TXT
so on and so on
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
what I would really like to do is to take every OP1.TXT file in that folder and make a folder named with only the first fourteen characters. So, if I did this to the above I would wind up with three folders named as follows.
121-00-00-9014
121-25-25-9026
121--25-50-1622
Inside these folders I will create another subfolder named POST, and inside that subfolder I will put the original .txt programs.
So in the end taking the first .txt file in the above post, I would wind up with a folder named 121-00-00-9014, and inside that folder I will have a subfolder named POST and inside that subfolder I will have the programs 121-00-00-9014 R00 OP1.txt, 121-00-00-9014 R00 OP2.txt and 121-00-00-9014 R00 OP3.txt.
Making all initial folders is the first step.
Thanx for you patience one more time
J.D.
121-00-00-9014
121-25-25-9026
121--25-50-1622
Inside these folders I will create another subfolder named POST, and inside that subfolder I will put the original .txt programs.
So in the end taking the first .txt file in the above post, I would wind up with a folder named 121-00-00-9014, and inside that folder I will have a subfolder named POST and inside that subfolder I will have the programs 121-00-00-9014 R00 OP1.txt, 121-00-00-9014 R00 OP2.txt and 121-00-00-9014 R00 OP3.txt.
Making all initial folders is the first step.
Thanx for you patience one more time
J.D.
Me guess you did something wrong.dragonworks wrote:This is what what I have now.
A folder titled 121
Inside that folder I have programs such as
FROM:MVV wrote:... template [N1-14]\[N] ....
Code: Select all
c:\Tempo\TC>dir /b
c:\Tempo\TC\121-00-00-9014 R00 OP1.TXT
c:\Tempo\TC\121-00-00-9014 R00 OP2.TXT
c:\Tempo\TC\121-00-00-9014 R00 OP3.TXT
c:\Tempo\TC\121-25-25-9026 R01 OP1.TXT
c:\Tempo\TC\121-25-25-9026 R01 OP2.TXT
c:\Tempo\TC\121-25-25-9026 R01 OP3.TXT
c:\Tempo\TC\121-25-25-9026 R01 OP4.TXT
c:\Tempo\TC\121-25-50-1622 R00 OP1.TXT
c:\Tempo\TC\121-25-50-1622 R00 OP2.TXT
Code: Select all
c:\Tempo\TC>dir /b /s
c:\Tempo\TC\121-00-00-9014
c:\Tempo\TC\121-25-25-9026
c:\Tempo\TC\121-25-50-1622
c:\Tempo\TC\121-00-00-9014\121-00-00-9014 R00 OP1.TXT
c:\Tempo\TC\121-00-00-9014\121-00-00-9014 R00 OP2.TXT
c:\Tempo\TC\121-00-00-9014\121-00-00-9014 R00 OP3.TXT
c:\Tempo\TC\121-25-25-9026\121-25-25-9026 R01 OP1.TXT
c:\Tempo\TC\121-25-25-9026\121-25-25-9026 R01 OP2.TXT
c:\Tempo\TC\121-25-25-9026\121-25-25-9026 R01 OP3.TXT
c:\Tempo\TC\121-25-25-9026\121-25-25-9026 R01 OP4.TXT
c:\Tempo\TC\121-25-50-1622\121-25-50-1622 R00 OP1.TXT
c:\Tempo\TC\121-25-50-1622\121-25-50-1622 R00 OP2.TXT
c:\Tempo\TC>
- - -
e.g. read this: http://ghisler.ch/board/viewtopic.php?p=287482#287482dragonworks wrote:Is there anyway to upload pictures here?
.
These are the details I've asked for.dragonworks wrote:So in the end taking the first .txt file in the above post, I would wind up with a folder named 121-00-00-9014, and inside that folder I will have a subfolder named POST and inside that subfolder I will have the programs 121-00-00-9014 R00 OP1.txt, 121-00-00-9014 R00 OP2.txt and 121-00-00-9014 R00 OP3.txt.
Making all initial folders is the first step.
You need to select all *.txt files, open Files - Multi-Rename-Tool and use name template [N1-14]\POST\[N], and it will move your *.txt files to POST subfolders of folders with program names as you want in one step (with necessary subfolders creation).
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
Stefan2 wrote:Me guess you did something wrong.dragonworks wrote:This is what what I have now.
A folder titled 121
Inside that folder I have programs such as
I didn't do anything or use TC, this is what I am starting with. On our Network there are folders for part numbers such as
121
211
321
371
inside those folders are the .txt files for the G code programs
that is what I am starting with.
I need individual folders for each Part Number such as
121-00-00-9014 that is inside the existing 121 folder.
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
I am not familiar with some of the things you are asking me to do, I will get our IT guy in here to help me muddle through this. I am sure you guys have the answers and are on the right track. I will get some screen shots to show what I have and what I am starting with and what I am looking to accomplish. The IT guy will help me with that since I don't usually work with that stuff either.
Thanks Again
Jerry D.
Thanks Again
Jerry D.
Sorry, I've missed that your files are in different folders (121, 211 etc). So you have Programs folder with part number subfolders (121, 211 etc).
You should open Programs folder and press Ctrl+B in order to see all programs together, then select them all and open MRT.
Then, if you need to create subfolders in part number subfolders, you need to use name suggested template [N1-14]\POST\[N]. You can also use template ..\[N1-14]\POST\[N] in order to create subfolders for programs just in your main Programs folder and not in part number subfolders.
Before:
After renaming with [N1-14]\POST\[N] template:
After renaming with ..\[N1-14]\POST\[N] template:
You should open Programs folder and press Ctrl+B in order to see all programs together, then select them all and open MRT.
Then, if you need to create subfolders in part number subfolders, you need to use name suggested template [N1-14]\POST\[N]. You can also use template ..\[N1-14]\POST\[N] in order to create subfolders for programs just in your main Programs folder and not in part number subfolders.
Before:
Code: Select all
Programs\121\121-00-00-9014 R00 OP1.TXT
Programs\121\121-00-00-9014 R00 OP2.TXT
Programs\121\121-00-00-9014 R00 OP3.TXT
Programs\121\121-25-25-9026 R01 OP1.TXT
Programs\121\121-25-25-9026 R01 OP2.TXT
Programs\121\121-25-25-9026 R01 OP3.TXT
Programs\121\121-25-25-9026 R01 OP4.TXT
Programs\121\121-25-50-1622 R00 OP1.TXT
Programs\121\121-25-50-1622 R00 OP2.TXT
Code: Select all
Programs\121\121-00-00-9014\121-00-00-9014 R00 OP1.TXT
Programs\121\121-00-00-9014\121-00-00-9014 R00 OP2.TXT
Programs\121\121-00-00-9014\121-00-00-9014 R00 OP3.TXT
Programs\121\121-25-25-9026\121-25-25-9026 R01 OP1.TXT
Programs\121\121-25-25-9026\121-25-25-9026 R01 OP2.TXT
Programs\121\121-25-25-9026\121-25-25-9026 R01 OP3.TXT
Programs\121\121-25-25-9026\121-25-25-9026 R01 OP4.TXT
Programs\121\121-25-50-1622\121-25-50-1622 R00 OP1.TXT
Programs\121\121-25-50-1622\121-25-50-1622 R00 OP2.TXT
Code: Select all
Programs\121-00-00-9014\121-00-00-9014 R00 OP1.TXT
Programs\121-00-00-9014\121-00-00-9014 R00 OP2.TXT
Programs\121-00-00-9014\121-00-00-9014 R00 OP3.TXT
Programs\121-25-25-9026\121-25-25-9026 R01 OP1.TXT
Programs\121-25-25-9026\121-25-25-9026 R01 OP2.TXT
Programs\121-25-25-9026\121-25-25-9026 R01 OP3.TXT
Programs\121-25-25-9026\121-25-25-9026 R01 OP4.TXT
Programs\121-25-50-1622\121-25-50-1622 R00 OP1.TXT
Programs\121-25-50-1622\121-25-50-1622 R00 OP2.TXT
-
- Junior Member
- Posts: 29
- Joined: 2015-10-20, 20:00 UTC
- Location: poughkeepsie ny
This worked great, I am going to fool around with it to see if I can get it to pull all the programs into the Post folder with the same first 14 characters, and a couple of other things.MVV wrote:These are the details I've asked for.dragonworks wrote:So in the end taking the first .txt file in the above post, I would wind up with a folder named 121-00-00-9014, and inside that folder I will have a subfolder named POST and inside that subfolder I will have the programs 121-00-00-9014 R00 OP1.txt, 121-00-00-9014 R00 OP2.txt and 121-00-00-9014 R00 OP3.txt.
Making all initial folders is the first step.
You need to select all *.txt files, open Files - Multi-Rename-Tool and use name template [N1-14]\POST\[N], and it will move your *.txt files to POST subfolders of folders with program names as you want in one step (with necessary subfolders creation).
Thank you very much you saved me hours of work so far.
J. D.