Making a Special File Name
Forum rules
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Making a Special File Name
I want to capture a .fits file whose name is only (Target Name). I have checked "Edit File Name Templates Manually" and it now shows (Target Name) only. Still I am getting (Target Name) and (DateTime:S). How can I get rid of the DatteTime?
Re: Making a Special File Name
Further:
Just playing around. If I take a series of SnapShots over a period of 10 min., they all have the same DateTime name and differ only by sequence number. Is that the way it is supposed to work?
Just playing around. If I take a series of SnapShots over a period of 10 min., they all have the same DateTime name and differ only by sequence number. Is that the way it is supposed to work?
- admin
- Site Admin
- Posts: 13344
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Making a Special File Name
Hi,
I think the answer is that it's all a bit complicated…
If you use the daytime tag in the file name then it's the date and time that the captures were started. There is a separate frame time tag that can be used to insert the time that the frame was captured.
There is also code tries to guarantee that it's impossible for the capture file name to be repeated if you press start capture or snapshot a second time. The point of this is to stop people from accidentally overwriting previous capture files without realising what they're doing. Actually, the fact that previous capture software did this almost by default was one of the reasons I started writing SharpCap – after a couple of evenings using other software and overwriting the files I just captured by mistake I knew that this was a silly error and had to be eliminated.
If you're trying to capture a file to a specific file name then you may be better off using the scripting option where you can make a Python script call
Which will snapshot a single frame to the specified file name and happily overwrite that filename with a new frame if your script calls the same method again.
Hope this helps, Robin
I think the answer is that it's all a bit complicated…
If you use the daytime tag in the file name then it's the date and time that the captures were started. There is a separate frame time tag that can be used to insert the time that the frame was captured.
There is also code tries to guarantee that it's impossible for the capture file name to be repeated if you press start capture or snapshot a second time. The point of this is to stop people from accidentally overwriting previous capture files without realising what they're doing. Actually, the fact that previous capture software did this almost by default was one of the reasons I started writing SharpCap – after a couple of evenings using other software and overwriting the files I just captured by mistake I knew that this was a silly error and had to be eliminated.
If you're trying to capture a file to a specific file name then you may be better off using the scripting option where you can make a Python script call
Code: Select all
SharpCap.SelectedCamera.CaptureSingleFrameTo('d:\\filename.png', False)
Hope this helps, Robin
Re: Making a Special File Name
That worked. Thanks. Except it can only create a file with the extension that comes with that camera. Lite FITS and not FIT. When I try to capture an image and name it "Name".FIT, I get an error. The image can only be saved as "Name".FITS. The problem is that the software that uses that image will only accept "Name".FIT.
Is there a RENAME operator in SharpCap scripting?
Or can a batch file be called after the capture to ren the file through DOS?
Is there a RENAME operator in SharpCap scripting?
Or can a batch file be called after the capture to ren the file through DOS?
- admin
- Site Admin
- Posts: 13344
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Making a Special File Name
Hi,
You can rename the file using the Python scripting language. See https://stackoverflow.com/questions/249 ... n/47708313
The save function deliberately enforces the correct file extension to avoid any likelihood of people saving to an incorrect extension. Of course you can rename your files afterwards but that proves that you know what you're doing rather than getting the wrong file extension by mistake.
Cheers, Robin
You can rename the file using the Python scripting language. See https://stackoverflow.com/questions/249 ... n/47708313
The save function deliberately enforces the correct file extension to avoid any likelihood of people saving to an incorrect extension. Of course you can rename your files afterwards but that proves that you know what you're doing rather than getting the wrong file extension by mistake.
Cheers, Robin
Re: Making a Special File Name
I have looked at the page you pointed me to and tried several iterations but none worked. I'm sure you don't have time to teach me Python.
Is there someone in the group who could help me with this task?
Is there someone in the group who could help me with this task?