Jump to content

Batch file


---
 Share

Recommended Posts

I need to create a batch file to pull the .chr/.hdr/.fet files from the
results folder to our network drive. Any assistance on this would
be greatly appreciated.
Link to comment
Share on other sites

MOVE "C:\PATH\FILE.EXT" "N:\PATH\"

You can use wildcards as * or ? to move several files or random named files.

Hum, giving it a second tought. Is your network stable? There are more robust solutions with robocopy, but usually it's not nessecairly to control the integrety (not 100% sure of the word, not a yank or brit) of the moved files.
Link to comment
Share on other sites

So, just insert that text into note-pad, and save it as a .bat file? Then insert it into the program folder?

MOVE "C:\PATH\FILE.EXT" "N:\PATH"
Link to comment
Share on other sites

You forgot two double quotes. (If that path contains space it will end up doing something else then your intent.)
Move "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\chr.txt" "T:\DMR\CMM Data\0934_Data\merge_chr.txt"
Link to comment
Share on other sites

Try this !

Copy "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*chr.txt" "T:\DMR\CMM Data\0934_Data\*chr.txt"
Copy "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*hdr.txt" "T:\DMR\CMM Data\0934_Data\*hdr.txt"

As Eric wrote: " You can use wildcards as * "
Link to comment
Share on other sites

Unless Calypso overwrite previous table files that might not give you a satisfying result when your spc program keeps reading old files over and over hehehe 😃

But do what Reiner says, but change copy to move, or add the syntax del to your original files.
Link to comment
Share on other sites

Are you looking to create a copy in the network folder or send results there?

Try: Resources --> Name for output files

This will allow you to set the directory and output names. You will need to do this for each of the 3 types.
You can set for current plan or globally.
Link to comment
Share on other sites

Unfortunately that field is currently being used to save a compact report:

"T:\DMR\CMM Data\100292 Op-10_Rev_B\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt"

Unless I can enter multiple lines of the above type code, which I'm guessing I can't?

Thank you everyone for all the help. I really appreciate it. It's just not working. My next stop is Zeiss support.
Link to comment
Share on other sites

I was able to enter multiple lines when I tested.
Select the Output type in the dropdown box and check the "Name of output file variable" box.
Repeat for each file type.
This will add each to the box at the bottom and then you can edit the output path and file name.
Link to comment
Share on other sites

There are three possible errors. Either a typo, or you dont have write permission on the network location, or you are running unix.

Open the start menu, search for cmd, start it. And type
move /?
And Compare the example to yours.
Link to comment
Share on other sites

Use this
move "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*chr.txt" "T:\DMR\CMM Data\0934_Data\"
move "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*hdr.txt" "T:\DMR\CMM Data\0934_Data\"

You cant move or copy files to a wilcard name.

Or
move "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*.txt" "T:\DMR\CMM Data\0934_Data\"
If your "from" folder dont contain any more txt files that you dont wish to move.
Link to comment
Share on other sites

 Share

×
×
  • Create New...