473,288 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

How to give file new name ?

1
Hello, im trying to create new file and rename but without success can some one tell me how to do it

public void savebytetobinary(int address, byte data, string filename)
{
FileStream fsi1 = File.OpenWrite(filename);
BinaryWriter bw1 = new BinaryWriter(fsi1);
fsi1.Position = address;
bw1.Write((byte)data);
fsi1.Flush();
bw1.Close();
fsi1.Close();
fsi1.Dispose();
}
Jul 19 '21 #1
1 2322
dev7060
626 Expert 512MB
Hello, im trying to create new file and rename but without success can some one tell me how to do it
What's the error? ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎
Jul 19 '21 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Fu Bo Xia | last post by:
the java.lang.Object.forName method takes a java class name and returns a Class object associated with that class. eg. Class myClass = Object.forName("java.lang.String"); by if i only know the...
1
by: Luke Airig | last post by:
I am using the Saxon 6.5.3 engine and I have an xsl stylesheet that merges two files on a date_time field and writes out a tab-delimited flat file. My working version has a hard-coded file name in...
3
by: Reginald Blue | last post by:
stupid question: RemotingConfiguration.Configure("MyProject.exe.config"); (where the actual EXE that's built is named "MyProject.exe", of course). is there any way to do that without hard...
1
by: MarkWH | last post by:
I am writing a simple reverse proxy using .Net. The basic design is to capture all traffic (from all URL's) in an HttpHandler and the respond accordingly. The problem is that I when a URL is...
4
by: kevin | last post by:
Hi, I am trying to create a page so the user can browse the network, select a file and have that file name (text) inserted into our sql DB so I can build the hyperlink path later on. Here's what...
1
by: nicknack | last post by:
Hello. I would like to give my user the option to browse his files (like the simple fileUpload control do) and after selecting the file (and when the fileUpload control hold in his text box the...
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
9
by: ashokd001 | last post by:
Hi I am faceing a problem with a space in file name. I want to write a script which will open a file that file contain others file name, among them few file name contain space. >cat checkfile...
9
by: Bill David | last post by:
I know it's very strange to do that since we have the file name when we call: int open(const char *pathname, int oflag,...); And we can store the file name for later usage. But I just wonder if...
0
by: WillChapman | last post by:
Hello charitable, I have a repetitive task that requires the user to go to a command prompt, navigate to a folder (usually deep in the system), and perform a syntax scan on a file (with an in-house...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.