How to copy a file from a disk to a specified sector of another di

Hi,

I want to perform the following operations given below.

1. Read a file from a disk 
2. Write the same file to another disk 
3. In the second disk the written file should be on the same 
cylinder/track/sector as it is on the first disk.

Hoping to get a reply soon.
TIA.

regards,
Jahfer V P.
0
P (87)
6/20/2005 8:37:02 AM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
425 Views

Similar Articles

[PageSpeed] 9

you can't do this at a file level.
Thanks
Vipin

"Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message 
news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
> Hi,
>
> I want to perform the following operations given below.
>
> 1. Read a file from a disk
> 2. Write the same file to another disk
> 3. In the second disk the written file should be on the same
> cylinder/track/sector as it is on the first disk.
>
> Hoping to get a reply soon.
> TIA.
>
> regards,
> Jahfer V P. 


0
vipin (696)
6/20/2005 8:52:04 AM
If it can't do at a file level, how to do it in other ways. 

That is, how to copy data from a specified sector of one disk to the same 
sector of another disk?

"Vipin" wrote:

> you can't do this at a file level.
> Thanks
> Vipin
> 
> "Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message 
> news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
> > Hi,
> >
> > I want to perform the following operations given below.
> >
> > 1. Read a file from a disk
> > 2. Write the same file to another disk
> > 3. In the second disk the written file should be on the same
> > cylinder/track/sector as it is on the first disk.
> >
> > Hoping to get a reply soon.
> > TIA.
> >
> > regards,
> > Jahfer V P. 
> 
> 
> 
0
JahferVP (4)
6/20/2005 9:08:02 AM
using ioctls, checkout DeviceIoControl(...)
Thanks
Vipin

"Jahfer V P" <JahferVP@discussions.microsoft.com> wrote in message
news:03DCD1DD-073F-48A2-A2E1-6159354E61CF@microsoft.com...
> If it can't do at a file level, how to do it in other ways.
>
> That is, how to copy data from a specified sector of one disk to the same
> sector of another disk?
>
> "Vipin" wrote:
>
> > you can't do this at a file level.
> > Thanks
> > Vipin
> >
> > "Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message
> > news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
> > > Hi,
> > >
> > > I want to perform the following operations given below.
> > >
> > > 1. Read a file from a disk
> > > 2. Write the same file to another disk
> > > 3. In the second disk the written file should be on the same
> > > cylinder/track/sector as it is on the first disk.
> > >
> > > Hoping to get a reply soon.
> > > TIA.
> > >
> > > regards,
> > > Jahfer V P.
> >
> >
> >


0
vipin (696)
6/20/2005 5:16:06 PM
This is not an easy thing to do. For one thing, the track/sector/etc. must be available on
the target drive, and you have no way to guarantee that, or in general even detect if it
is in use. Generally, the whole idea of sector copying should be a dead issue.  That's why
we have file systems, to save us from ever caring about this sort of problem.
				joe

On Mon, 20 Jun 2005 01:37:02 -0700, "Jahfer V P" <Jahfer V P@discussions.microsoft.com>
wrote:

>Hi,
>
>I want to perform the following operations given below.
>
>1. Read a file from a disk 
>2. Write the same file to another disk 
>3. In the second disk the written file should be on the same 
>cylinder/track/sector as it is on the first disk.
>
>Hoping to get a reply soon.
>TIA.
>
>regards,
>Jahfer V P.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
6/21/2005 1:55:21 AM
Note that you must have suitable privleges to do this.
					joe

On Mon, 20 Jun 2005 22:46:06 +0530, "Vipin" <Vipin@nospam.com> wrote:

>using ioctls, checkout DeviceIoControl(...)
>Thanks
>Vipin
>
>"Jahfer V P" <JahferVP@discussions.microsoft.com> wrote in message
>news:03DCD1DD-073F-48A2-A2E1-6159354E61CF@microsoft.com...
>> If it can't do at a file level, how to do it in other ways.
>>
>> That is, how to copy data from a specified sector of one disk to the same
>> sector of another disk?
>>
>> "Vipin" wrote:
>>
>> > you can't do this at a file level.
>> > Thanks
>> > Vipin
>> >
>> > "Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message
>> > news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
>> > > Hi,
>> > >
>> > > I want to perform the following operations given below.
>> > >
>> > > 1. Read a file from a disk
>> > > 2. Write the same file to another disk
>> > > 3. In the second disk the written file should be on the same
>> > > cylinder/track/sector as it is on the first disk.
>> > >
>> > > Hoping to get a reply soon.
>> > > TIA.
>> > >
>> > > regards,
>> > > Jahfer V P.
>> >
>> >
>> >
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
6/21/2005 1:55:54 AM
well  yes the assumption is admin privelleges

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:tsseb110h9hfdn9t1bguhrmoagpd4k85j1@4ax.com...
> Note that you must have suitable privleges to do this.
> joe
>
> On Mon, 20 Jun 2005 22:46:06 +0530, "Vipin" <Vipin@nospam.com> wrote:
>
>>using ioctls, checkout DeviceIoControl(...)
>>Thanks
>>Vipin
>>
>>"Jahfer V P" <JahferVP@discussions.microsoft.com> wrote in message
>>news:03DCD1DD-073F-48A2-A2E1-6159354E61CF@microsoft.com...
>>> If it can't do at a file level, how to do it in other ways.
>>>
>>> That is, how to copy data from a specified sector of one disk to the 
>>> same
>>> sector of another disk?
>>>
>>> "Vipin" wrote:
>>>
>>> > you can't do this at a file level.
>>> > Thanks
>>> > Vipin
>>> >
>>> > "Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message
>>> > news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
>>> > > Hi,
>>> > >
>>> > > I want to perform the following operations given below.
>>> > >
>>> > > 1. Read a file from a disk
>>> > > 2. Write the same file to another disk
>>> > > 3. In the second disk the written file should be on the same
>>> > > cylinder/track/sector as it is on the first disk.
>>> > >
>>> > > Hoping to get a reply soon.
>>> > > TIA.
>>> > >
>>> > > regards,
>>> > > Jahfer V P.
>>> >
>>> >
>>> >
>>
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
vipin (696)
6/21/2005 6:13:18 AM
You can easily move, copy, delete, and read files using several I/O
methods. The third thing you listed is probably impossible. The reason
is that the target sector on the second disk drive may already be
occupied with data. Disk writes place data in "available" sector space
so you naturally cannot assume that a specific sector will be available
when you write. The exception to this is the boot sector of the disk
which starts at 0 (zero) sector, 0 cylinder and occupies a finite number
of bytes on the disk (plus slack space). Writing data to a sector that
has data already can cause serious file corruption and system damage.

Disk drives, unless they are formatted the same, will not have the same
number of sectors per cluster or bytes per sector.

Hex editors can read and manipulate individual bytes (or sectors) of a
file, and most can also compare two files on a disk.

These two articles deal with absolute disk reads:

http://www.codeguru.com/Cpp/W-P/system/misc/article.php/c5765/
http://www.codeguru.com/Cpp/W-P/system/misc/article.php/c5665/

This article discusses typical disk structure and also has some
downloadable source in a zip file:

http://www.funducode.com/freevc/disk/disk1.htm

If you are familiar with Assembly Language, then the last one is more
for you. You have to really know what you are doing when you use
assembler code in a Windows app. Crashes and/or system damage is easily
accomplished.

HTH (c:


"Jahfer V P" <Jahfer V P@discussions.microsoft.com> wrote in message
news:846B7A49-C2FC-405C-8B96-4CF48356717A@microsoft.com...
> Hi,
>
> I want to perform the following operations given below.
>
> 1. Read a file from a disk
> 2. Write the same file to another disk
> 3. In the second disk the written file should be on the same
> cylinder/track/sector as it is on the first disk.
>
> Hoping to get a reply soon.
> TIA.
>
> regards,
> Jahfer V P.


0
7/2/2005 7:52:24 PM
Reply:

Similar Artilces:

How can i move a macro from one computer to another
i would like to move a macro from one computer to another i Excel Macros live in excel workbooks. So you can just copy that workbook with the macro to the other pc and open it there. TorToms wrote: > > i would like to move a macro from one computer to another i Excel -- Dave Peterson ec35720@msn.com Or you could export the module containing the macro as a *.BAS file, email it to other computer then import to another workbook. Gord Dibben Excel MVP On Wed, 08 Sep 2004 07:05:48 -0500, Dave Peterson <ec35720@msn.com> wrote: >Macros live in excel workbooks. > >So ...

suggested ways to manipulate XML files in .Net?
Hi everyone, I'm going to manipulate some XML files in my next project-- crawl through the tags, compare if file X has the same nodes as file Y, and if not, what the differences are and who's missing what. I'll also be comparing values between nodes in the two files, for when both documents do have the same named nodes. What .Net classes should I be looking at to accomplish these tasks? Thanks a bunch. Steve Hershoff wrote: > I'm going to manipulate some XML files in my next project-- crawl through > the tags, compare if file X has the same nodes as file Y, and...

Strange behavior when copying formula.
Hi, Here is what I'm trying to do. I want to show the summation of the first two rows' number in the third row. I use the summation function to get the first result. Then, I copy and paste the result to the other two, but they show the same results as the first one. I check the formula of all three results, and they are all correct and referring to the right cells. Why is that? 1 2 3 1 2 3 2 2 2 Leo Do you have Tools/Options/Calculation set to Manual? If so, click the Automatic button. In article <eE#EeXFhDHA.2512@TK2MSFTNGP09.phx.gbl>, "Leo Leon...

Excel 2007 and Word 2007 Hangs when using the File -> Open command
I have a couple users that when they have Excel 2007 or Word 2007 open, and click the File -> Open option, and choose a file, it either takes about 3 minutes to open the file or the program will crash. If they were to double click on the documents or spreadsheets, the doc or sheet will open right up. This is happening on the user's Hard drive as well as network drives. Once you get a file opened in Word or Excel, however, the next time you go to File -> Open, it's really fast to open the file. ...

Saving chart as an image file
I want to create a pie chart in Microsoft Excel, then save it as an image file (.jpg or .gif) so I can put it on a website. How do I do this? Secondly, as I create my pie chart, how do I set my data labels? I want to change them from the default (numbers) to my own description for each slice. Jon Peltier has some instructions in his Excel Charting FAQ article for exporting a chart in gif format: http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=209#jon008 To add your own labels to the chart, you can use Rob Bovey's XY Chart Labeler. It's a free add-in that yo...

Integration Manager--log file name?
Is there any way to know the name of the log file (we're writing our logs to text file) from within one of the "After" integration events? If we're successful, we need to send the user an email telling them that the event is successful. We're currently cycling through the whole folder to find the latest one, but if there were a variable in the Integration Manager VBScripts that I could use, that would be much better. Thanks. PSC: If I recall correctly, IM has a Document Error and Integration Error event in the integration properties. Rather than looking at the...

Soft copy of training material
Hi all, I have completed the class room training of CRM 3.0 Installatio and Customization. I also got the printed training material. But soetimes, searching something in the book becomes very difficult. Can I have the soft copy of these training manuals? Does Microsoft provides it? We are Gold certified partners btw. If anybody has some idea about this, please let me know. Thanks, -Imran https://dynamics.microsoftelearning.com/eLearning should find everything from your course in the eLearning Courses (or at least, I'd presume so). Either way, the online courses are a handy thing ...

File Sharing between XP Pro and XP Home
I have a few questions concerning file sharing between XP Pro and XP Home in a Workgroup environment. I would really appreciate any help. 1)From what I'm gathering on the internet (I've read multiple articles) you cannot even connect a Windows XP Home computer to a domain. I'm I interpreting this correctly? 2)I have a new server with XP Pro and 5 other computers with XP Home. I only have 3 computers (which includes the new XP Pro server) that really need access to everything (or the main folders) on the server. The other 3 computers need limited access. If I purchase X...

PDF file #5
I have Publisher 2002 and would like to insert a .pdf file into a document I am working on. How do / Can I do this? Many thanks, Ger ...

linked files
When I open a file it says it is linked to another file. When I check the links it is linked to a file I no longer have. How do I find where the link is coming from and get rid of it. Going to the Edit Links doesn't seem to get rid of the file. Charlie C Try Bill Manville's excellent "FindLink" utility .. It's available at Stephen Bullen's page: http://www.oaltd.co.uk/MVP/Def�ault.htm -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "Charlie 5280" <Charlie 5280@discussions.microsoft.com>...

Retrieve .pst files
My PC at work is upgraded from windows NT to Windows 2000. Before upgrade I backed up all the outlook 2000 .pst files. Now I have outlook 2003. I unable to retreive .pst files. viji.pst file is available under C:\Documents and Settings\jviji\Local settings\Applicationdata/microsoft/outlook. From outlook menu file -> data file management ->add -> outlook 97-2002 personal folder.pst -> viji.pst prompts to enter passwd. Please reply how do I retrieve the passwd protected .pst file. This are very important emails. Please reply. Thanks Viji Viji Jayaraman <jviji@ems.att.co...

How can I access a file in Outlook Public Folder by VBscript
It does not have to be VBscript.. I need sync the file with my local harddrive... Thanks. Nix wrote: > It does not have to be VBscript.. > I need sync the file with my local harddrive... > > Thanks. Why does it need to be a script at all? You can add your public folder to your PF\Favorites (drag it there) and include it in your send/receive settings for offline use with your OST file. ...

Software copy-protection strategies involving unlock codes
I would like to learn about strategies for protecting my software against illicit copying, by supplying users with unlock codes which they have to use to unlock the program's full functionality. Does anyone know of any good books on this topic, or other sources of information on it. TIA Simon I don't, although I've done a bit of work in this area myself. The first issue you need to deal with is how to stop a customer that has the code from being able to give it to someone else. I simply have the code tied to the customers name and company, if any. This way, they can st...

moving files
How do I move files from publisher 98 to publisher 2000? The programs are installed separately. If you are talking about the documents you created, you wouldn't have to. But if you wanted to - copy and paste. -- JoAnn Paules MVP Microsoft [Publisher] "dunefarm" <dune@discus.micro.com> wrote in message news:3854FB0D-CB6B-4D3A-A922-0A982890D3FD@microsoft.com... > How do I move files from publisher 98 to publisher 2000? The programs are > installed separately. ...

open excel 2007 refresh query from batch file
Hello all, I have a simple script saved as "C:\refresh_excel.vbs" that opens an Excel file, and does a refresh for a query on Sheet 1. I created a scheduled task to run this every day. It worked fine for previous versions of Excel, but since I have upgraded to Excel 2007 it doesn't work. Any help it helping me figure this out would be appreciated. /*contents of refresh_excel.vbs*/ Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set objWorkBook = objExcel.Workbooks.Open("C:\reports\UPS.xls") objWorkbook.Sheets("...

Arrears Help Files
Hello all, I don't seem to have the help file for the Arrears transactions. I can't find it on my system don't see a reference to it in the main GP 10 help file. We have GP 10 SP 4. I looked in KB see no reference to that particular problem anywhere. TIA Anyone? On Feb 10, 8:12=A0am, Brian <nixtoo...@hotmail.com> wrote: > Hello all, I don't seem to have the help file for the Arrears > transactions. =A0I can't find it on my system don't see a reference to it > in the main GP 10 help file. =A0We have GP 10 SP 4. =A0I looked in KB see= no...

Can OnPrint output be saved to a file?
Can OnPrint output (icluding fonts,rectangles,brushes...) be saved to a file? I am currently writing output in rtf file format for this purpose and it is more time consuming then producing a report via OnPrint. Thanks. How about using standard OnPrint code and mess with the Print to file option in the Print dialog box? -- Jonathan Wood SoftCircuits http://www.softcircuits.com Available for consulting: http://www.softcircuits.com/jwood/resume.htm "Charles C." <binstar@aei.ca> wrote in message news:%23m9f8B3GEHA.3940@tk2msftngp13.phx.gbl... > Can OnPrint output (icludin...

Message-Data file not properly closed???
Upon boot of Outlook, EVERYTIME, I get this message--Data file did not close properly the last time it was used and is being checked for problems. Performance might be affected by the check in progress. When I leave Outlook, I have made sure to close all files and exit properly. Is there some reason this happens? I even go back to my main screen now. Is there something more I should be doing. Did the file checking finish before you closed Outlook? If not, it will continue/restart the next time you start Outlook. If it still does this after the checking has completed, the...

"Can't Create Backup FIle. Save [filename] Without Backp?
I get the following message every so often when running Excel 2003 under Win XP: "Can't create backup file. Save [finename] without backup?" I respond: "OK" "Your changes could not be saved to [filename] because of a sharing violation. Try saving to a different file." I respond: "OK". It presents me with the standard window allowing me to enter a new filename, which I do, then press OK. Then I get: "Do you want to save the changes you made to [fileename]? I respond: "Yes" "Document not saved." This is VERY annoying. I am t...

Money Backup File Security
I regularly take backup of my money file. I secure my money software with a password also. My question is regarding the security of the backup file. When I take a backup do I need to remember the password also? Let's say I took a backup a month ago and after that I changed my money password. And for reasons unknown I forgot the password which I had set when I took the backup. In the event of failure when I try to restore it from that backup will it ask me for a password? If yes, which one? If not - then is it not a security breach considering the fact that the backup CD might be sto...

Mail forwarding to another server
Hi, Is there any way to forward all mails for a particular user from exchange server to another mail server. Any help would be great. Thanks and regards, Shammy. Hi Create a contact with the external address of the user then on the users account in Active Directory User & Computers | Exchange General | Delivery Options | Forward to: click modify and point to your newly created contact. Regards -- Ben Hoffman MVP Exchange http://www.exchangeis.com "SHAMMY" <SHAMMY@discussions.microsoft.com> wrote in message news:170FE8CA-1780-484F-B9C3-377669F5732C@microsoft.com... ...

Copy Posts from one Public Folder to Another
I have an Exchange 2003 Public folder tree that has multiple levels. I have a need for users to Post to one public folder and then have a copy of that Post copied to another public folder automatically. I have set this up for emails (plain forwarding) and it works fine but I have yet been able to get the Posts to duplicate to the other folder. Does anyone have any ideas? Your help is greatly appreciated. Thanks Glenn There are two ways to forward email out of a public folder: 1. Used a rule on the public folder. As owner of the public folder go to properties and to the folder assistant ...

Problem with Money finding files after hard drive crash
My hard drive was corrupted and crashed. I was able to preserve data files, including the Money account file and Money backup file. The hard drive was replaced, and I copied the Money data files back onto the hard drive, as well as the Money program. When I try to set up Money again, it cannot find or connect with the data files, despite my specifying the drive location of the files. Is there a way to get that to happen? I don't know if this is part of the problem, but the description of my data files calls them Money 2004 files. The recovery version of Money is Money 2005, wh...

Copying a sheet fails
I have a line that copies a sheet from one book to another. It works a number of times in my macro then inexplicably stops working. The line is: ActiveSheet.Copy Before:=Workbooks(NewBookName).Sheets("XXX") And I get the error: 1004 "Copy method of worksheet class failed" It stops when I try to add the 54th sheet in a workbook - I don't know if that number is significant. There is no problem with the string: 'NewBookName' or the sheet named 'XXX' (as I say the line works 52 times) But suddenly I get an error Anyone seen this bef...

How to: Open *.MSG File from Hard Drive via Code
I need to : Open *.MSG File from Hard Drive via Code and extract the file attachment. I have hundreds of these emails that we need the attachments extracted from. But the .msg files are on a hard drive. Someone help me out here.... I need the code to open and access the mailitem.... how do I open a .msg file? Use the CreateItemFromTemplate() method for that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "B...