473,326 Members | 2,081 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,326 software developers and data experts.

(New to .NET) How do I copy a file from one folder, and rename it in another folder?

Hello everybody,

As the topic suggests, I would like to take for example "C:\pics\1.jpg"
and copy the image to "D:\stuff\5.jpg".

Same exact picture (a copy of the file), but rename it and place it in
a new directory?

Thank you in advance for any help!

Sep 20 '06 #1
1 1244
AppleBag <ap******@gmail.comwrote:
Hello everybody,

As the topic suggests, I would like to take for example "C:\pics\1.jpg"
and copy the image to "D:\stuff\5.jpg".

Same exact picture (a copy of the file), but rename it and place it in
a new directory?
File.Copy ("c:\\pics\\1.jpg", "d:\\stuff\\5.jpg");

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Evgeny Zoldin | last post by:
Hi, ALL I've developed some prjoect ( VB.NET ) , let Project1, and created for that Setup project, let Setup1. Installed it on a clear mashine - PC1. Then I decided to develop that futher as...
11
by: Marcelo López | last post by:
I need to create a folder in the file system owned by an special user created by my application. The idea is that only my app will have permissions to delete and create files on that folder. My...
8
by: Mark Goldin | last post by:
I am trying to create a new ASP.NET application. By default it has name "webapplications1". How can I name it differently and also point to a folder of my choice? Thanks
1
by: Jay at SCA | last post by:
I've been having the following issue with a windows service I've created in vb.net (.net fw 1.1): Basically, my service monitors a folder for the creation of any new files of a particular type...
9
by: John | last post by:
Tried this on microsoft.public.access.gettingstarted - no response - perhaps more appropriate here. I'm not a database user, simply helping someone get started with a new computer. The old...
2
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I'm new to .NET development, although I have worked with VS2005 and VC++ for a while. A frequent task for me is to create a new project for a new version of my program, without destroying the...
1
by: smoke20 | last post by:
Hello all, I am fairly new to VBS and I have a question. Here's what I am trying to accomplish: I have a source folder (example: H:\Ermx Processing\Davie) that will contain a folder named as the...
9
by: AWW | last post by:
Running XP - Visual Studio 2005 - VB Want to have duplicate projects - one safe and stable - other for experimenting Can't fine easy way to make duplicate project. Stupid question? or stupid ME?...
4
by: PHPstarter | last post by:
Hi guys. I'm having a problem with this case. I want a php script activated by a standard file submit to: 1) upload the file to ../../upload 2) copy the file to a directory further back, for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.