Kees Zeelenberg writes:
 > The problem is not with paths that contains backslashes; e.g.
 > dd if=a:\test of=disk_image.bin bs=1k count=1440, where test an ordinary 
 > file, works perfectly. The real problem is that a: is a directory, which 
 > cannot be opened and copied in the way this can be done on Unix operating 
 > systems, i.e. as if it is an ordinary file.

Yes. a:\ is the *root directory* of the floppy drive. What you want is
something that corresponds to the device special files on Unix. Unlike
Unix, on Windows there are no special files as such, in the sense that
there would/could be such "special file inodes" on NTFS (or FAT)
volumes (pointed to by directory entries). But device names are there
anyway, they exist only in the kernel's namespace. Or something like
that. The documentation for CreateFile says that the "file name" for
the A: floppy drive device is \\.\A: And indeed running:

       dd if=´\\.\A:' of=/tmp/adrive bs=1k
works and reads 1440 kilobytes.

also reading hard disks works fine, but here the name is
\\.\PHYSICALDRIVE<n>, for numerical values of n, like:

       dd if=´\\.\PHYSICALDRIVE0' of=/tmp/drive0 bs=1k count=100

--tml




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to