I have a mem file called girot.mem. It has the name to change program caption, how to change or edit the girot.mem? Here is the girot.mem file :
https://www.dropbox.com/s/90i4ob3g5j0kkgh/girot.mem?dl=0
The name I want change or edit in mem file is zoom to abcd. each time I change it using notepad, the exe file won't run.
Notepad has nothing to do with a mem file which is a binary file.
You edit a men file using restore and save commands. i.e.: Assuming your variable's name is myVar:
clear all
restore from girot.mem
myVar = "abcd"
save to girot.mem
If you would anyway use something external then use a hex editor or a language with commands to read and write binary, not notepad.
Related
I'm used to create source code via 'make new .txt' and modify its extension. And this is not great and kinda annoying for using both keyboard and mouse...
Q. so, Is there any way to create source file than that?
Yes, you can write a program that creates and opens an empty file, like this:
cd yourpath
type nul > new.c
Notepad "main.c"
Replace yourpath with the path where you intend to store your file to.
Save this file named to something like createfile.bat. Drag & Drop it to your favored place and then you can double-click it to create your file and open it. The problem you will face at the second use is that the file's name is unchanged. So, you will need to somehow make your filename unique, like adding a timestamp to its end or the like.
Extending the New Submenu.
Assuming you already have .c files associated with a text editor you can just import this .reg file into the registry:
REGEDIT4
[HKEY_CURRENT_USER\Software\Classes\.c\ShellNew]
"NullFile"=""
I found my way to make source code! by using shellscript..
open file manager
right click at dir to open terminal
use 'ni commands' of shell
It's a easy way to create and modify any file!
I currently try to write a short cmd file, which finds a specific file extension in a folder and saves the whole file name as a string, so it can then start a python script. This is what I have:
for %i in (*.py) do set filename= %i
"C:\Users\blabla\python.exe" %filename
I was looking for hours for a solution and this was the closest I got. I can't imagine, that it is that difficult.
Actually I don't even need the for loop, since only one .py file is in the concerning folder, but I didn't manage to find a solution. The *.py file changes from time to time depending on which version is used. Just clicking the cmd file would be easier than typing "C:\Users\blabla\python.exe" %filename by my own everytime, that's why I want to use a cmd file.
It's just for playing around and learn how to use cmd prompt works
What I want written as an example:
§get whole filename of file with .py extension§
set filename = XY.py
§run
"C:\Users\blabla\python.exe" %filename
I have a text-file I want to read in inside my simulation.vhd file but I do not know where to put it so that the code finds it, since I am not quite sure where it gets executed.
The simulator executes in the .sim folder - but this folder gets reset everytime when you start the simulation. Therefore the .txt file must be outside the sim folder and the the simulation.vhd you need to give a full path to the file like this:
stimuli : process
file infile: text open read_mode is "C:\Users\Name\F\L\lena_sw.txt";
There can be "This file came from another computer and might be blocked" message in file properties.
Is there a way to block back file in windows 7?
I need this for program testing.
You have to recreate the alternate data stream for the file. The easiest way to do this is by using Notepad. Run cmd.exe and navigate to the directory that contains the file. I'll use test.txt as an example, type this command:
Notepad "test.txt:Zone.Identifier"
Double quotes required. Notepad prompts you to create a new file, click Yes. Paste or write this:
[ZoneTransfer]
ZoneId=3
Press Ctrl+S to save.
Newbie to windows scripting. I need help running the .bat file on the command line so I can test it.
I used Text Document as my editor to create the file (opens up also as Notepad).
I performed file "save as" (ALL FILES). If I open up cmd, I can see the file has a .txt extension (myfile.bat.txt). So if I just type in cmd myfile.bat.txt the editor opens. I am not sure how to execute this correctly.
As for the logic in my batch script, I am basically logging into a remote directory (already created the net mount) and now I want to:
run an executeable file
rename some files.
With some research, I written this so far. I have saved it as a .bat file
# echo off
echo This is a batch file to run an executable and rename some files
pause
--run executable file here, just don't know how to do it
x:
cd x:
rename fileA fileB
Any help, good tips/practice would be great. Thanks.
Type in this command in cmd window:
rename myfile.bat.txt myfile.bat
Now you can run the script by simply invoking:
myfile.bat
or
myfile
(provided there's no myfile.exe or myfile.com in the same directory).
If you need to edit the script further, you can either right click it in Explorer and choose Edit or call the editor from the command window:
notepad myfile.bat
To call a program from the script, simply add its name, if it's in the current directory:
someprogram.exe
or the name with the path, if it's somewhere else:
directory\program.exe
or
d:\directory\program.exe
If the name or the path contain spaces, be sure to enclose the entire name & path string in double quotes:
"d:\directory\program name.exe"
you can just type the full name of the program
eg
"c:\program dir\program.exe"
or you can add the program directory to your path environment variable
set PATH=%PATH%;"c:\program dir"
and just type the program name
program
you can also edit your PATH variable in windows http://support.microsoft.com/kb/310519
NOTE: When you save the file in notepad, you want to save it as filename.BAT and select All Files from the second dropdown. If you don't it still gets saved as a .TXT.
A couple of command to consider:
CSCRIPT cscript /? in CMD
START http://ss64.com/nt/start.html
If you're doing say a VBSCRIPT use CSCRIPT to start it. If you're trying to execute another BATCH script or an EXE, use START