Computing.Net > Forums > Disk Operating System > Copying files with a space

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copying files with a space

Reply to Message Icon

Name: Kardian
Date: June 29, 2007 at 16:33:14 Pacific
OS: Windows XP Pro
CPU/Ram: AMD Athlon XP 1900+, 512M
Comment:

Hello,

I'm working with DOS 6.22 and I need to copy a file named "H START.G" (without the quotes), but when I use the copy command, it says "Too many parameters". If I try to copy using H*.G or any other use of the wildcard, the system tries to copy the file as "HSTART.G" instead of "H START.G". As a result, it gives me a file not found error. I've even tried HSTART~1.G and that doesn't work either. Any ideas?

MCP CCNP



Sponsored Link
Ads by Google

Response Number 1
Name: DAVEINCAPS
Date: June 29, 2007 at 18:17:04 Pacific
Reply:

I created a file named H START.G and both 6.22 and 98 dos saw it as HSTART~1.G. So I don't know why it's not copying. But when you have it on the 6.22 system and you do a DIR for the directory it's in, how does it show the file? That should be the way to copy it.

If you have more than one file for which 8.3 format could give HSTART~1.G then it could be something like HSTART~2.G and so on.


0

Response Number 2
Name: os2fan2
Date: June 30, 2007 at 00:03:20 Pacific
Reply:

Copy H?start.g h_start.g

This should do the trick.

The dream you dream alone is only a dream,
The dream we dream together is reality.


0

Response Number 3
Name: Kardian
Date: June 30, 2007 at 08:26:55 Pacific
Reply:

Thanks for the replies!

Doing a dir shows the file as H START.G, and it is the only file with that sort of name. I'm working with Windows 3.11, so maybe that's why the file doesn't show up as HSTART~1.G?

os2fan2, I will try out your idea when I get back to work on Monday.

Thanks again!

MCP CCNP


0

Response Number 4
Name: DAVEINCAPS
Date: June 30, 2007 at 12:09:33 Pacific
Reply:

Dos, and I think 3.1, shouldn't show the file with the space. Treat the space as an unseen character and use H?START.G as OS2fan2 suggests.

What OS and software created the file?

Also, if it's the only file there you can use *.* or *.G


0

Response Number 5
Name: os2fan2
Date: July 10, 2007 at 00:37:28 Pacific
Reply:

DOS will indeed show H START.G, if it is created by some OS that does not rely on VFAT. It will even show files like LPT1 and CON, if these happen to be in the directory.

It won't be able to work with them directly, though. To handle the first, use wildcards.

To handle the second, you could use a hacked version of command.com, which uses different devices. Things like LPT1 etc become standard files, which can be deleted.

The dream you dream alone is only a dream,
The dream we dream together is reality.


0

Related Posts

See More



Response Number 6
Name: Kardian
Date: July 10, 2007 at 22:52:45 Pacific
Reply:

I tried the methods used in the previous replies, but it didn't work. Even when using ? in place of the space, DOS still tries to copy the files as if they didn't have spaces.

As for the hacked version of command.com, I will see if I can find it. Thanks for all the replies!

MCP CCNP


0

Response Number 7
Name: DAVEINCAPS
Date: July 10, 2007 at 23:12:19 Pacific
Reply:

Again, what OS and software was used to create these files?


0

Response Number 8
Name: os2fan2
Date: July 11, 2007 at 03:05:18 Pacific
Reply:

You could use something like an OS/2 boot disk, or even a windows 9x one. These do have support for spaces in names.

I suppose you could use 4dos as well. I never had probs deleting sf data. ea when the need arose. This had two spaces.

The dream you dream alone is only a dream,
The dream we dream together is reality.


0

Response Number 9
Name: DAVEINCAPS
Date: July 11, 2007 at 13:08:25 Pacific
Reply:

A 9x bootdisk won't do it. Even 9x pure dos doesn't preserve the space, at least using its available internal commands. I have used NTFS4DOS to copy LFN correctly. I don't know about OS/2.

Technically, H START.G isn't an LFN if the space is an unseen character instead of a space. (But then the wildcard ? should have worked.)

Kardian, it'd be helpful to know how the file was created. Also, can you just use COPY *.* or COPY *.G? Even if that copies more files than you want, try it and post back what the copied files look like.

Oh, and I don't think your using win 3.11 makes any difference. On my 3.1 the file I created shows the same as with dos--HSTART~1.G.


0

Response Number 10
Name: Kardian
Date: July 12, 2007 at 09:07:51 Pacific
Reply:

The files were created by the DOS program I'm trying to transfer (from a DOS computer to a Win95 computer). Normally, I'd just slave the DOS computer's hard drive in the Windows 95 computer, but the DOS computer's hard drive uses a floppy drive cable instead of the standard IDE cable. Plugging the old hard drive into the Windows 95 computer's floppy controller didn't work.

I did try using COPY *.*, COPY *.G, COPY HSTART~1.G, and COPY H?START.G, but no matter what command I use, it tries to copy the file as HSTART.G and gives a file not found error.

The file appears to be a critical part of the program, as the program won't function correctly without it.

MCP CCNP


0

Response Number 11
Name: Mechanix2Go
Date: July 12, 2007 at 11:52:51 Pacific
Reply:

It seems unlikely in the extreme that the HD is connected to a floppy cable. Could be a RLL/MFM drive connected to a 34 pin AND A 20 pin.

I would get a LapLink cable and use DOS 6.22 intersvr/inetrlnk to xfer files.


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 12
Name: DAVEINCAPS
Date: July 12, 2007 at 13:08:11 Pacific
Reply:

About 2/3 the way down this page:

http://www.ahuka.com/dos/lesson7.html

it tells how to add a space to a file name using the ASCII 255 character. Maybe that's what your software did.

Try this: With numlock on type COPY H then hold the ALT key down and type 255 on the keypad. The dos icon should move one space. Type in the rest of the file name, START.G. It should show as
COPY H START.G--exactly the same as if you used a regular space but dos will see it differently. Then finish the line with the destination of where you want to copy the file.

Here's a list of the ascii characters:

http://www.techweb.com/encyclopedia...

Ascii 32 is also a space but it's used as a control character. I don't know if that makes a difference. You can experiment with the various ascii codes and see if any others result in a blank space. Also, take a close look at the 'space'. Is it possible there's a barely legible character there--maybe ascii 250?

It seems obvious that dos isn't seeing the space as a regular space so maybe this will work.



0

Response Number 13
Name: Mechanix2Go
Date: July 12, 2007 at 13:30:55 Pacific
Reply:

Hi DAVEINCAPS,

Good idea.

ASCII 32 is a 'real' space. As generated by the space bar. 255 is sometimes called 'nul'. As you say it will 'look like' a space.




=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 14
Name: DAVEINCAPS
Date: July 12, 2007 at 14:26:36 Pacific
Reply:

I created a file with ascii 255 instead of the space and dos did see it as H START.G instead of HSTART~1.G so it's getting close. But I had no problems copying it using any wildcard scenario.

Kardian, does the file by chance have a hidden or system attribute?


0

Response Number 15
Name: Glitchman
Date: July 13, 2007 at 12:12:01 Pacific
Reply:

I frequently create filenames with spaces (and other things) in pure DOS. There are a number of ways to do this, including tricks with PKZIP, QBASIC, and with Win 9x's native DOS commands. I'll give you one of the easiest methods. But first, check DAVEINCAPS' suggestion above regarding file attributes (this is too often overlooked) and remove them if necessary. Then do the following:

1. Get PKZIP for DOS if you don't already have it. Version 2.04 is common and sufficient for this task, but 2.50 is even better. (Google PKZIP250.EXE).

2. On the DOS machine, PKZIP temp.zip h?start.* (just in case it's really h start. g). If it's the only file, then PKZIP temp.zip *.* will suffice instead.

3. Copy the temp.zip onto your Win95 machine by the method of your choice.

4. Boot the Win95 machine in pure DOS mode and PKUNZIP temp.zip in the directory where it belongs.

5. DOS will see the file name exactly as it was before, spaces and all. Change file attributes back if necessary. Even Windows will see the 8.3 name with spaces and no tildes.


0

Response Number 16
Name: Intel 80486 (by meisinscotland)
Date: November 19, 2007 at 08:01:26 Pacific
Reply:

Just try putting the file in quotes "" and doing it again.

    
 

My blog


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Copying files with a space

Rename a file to file with a secuential number? www.computing.net/answers/dos/rename-a-file-to-file-with-a-secuential-number/4799.html

copying files from a: to c: www.computing.net/answers/dos/copying-files-from-a-to-c/12828.html

Copying files via a batch file www.computing.net/answers/dos/copying-files-via-a-batch-file-/11558.html