How do you copy files with BAD SYNTAX?


Recommended Posts

Hey guys,

I have a collection of 8 CDs that are full of files that I want to save a copy of on my PC. The problem is that I can't just copy them from the CD. After struggling to try to break the encryption, I realised that it has none! When I try to copy a file from the CD, I get this error:

"Cannot copy "filename": The filename, directory name, or volume label suntax is incorrect."

I noticed that all the files on the CD have the character "|" right before their extensions. thats no an L, thats the character on top of your Enter key.

And I realised that Windows has a problem handling files with that character, same goes with ?, and so on.

So I booted up my Linux LIVE CD, to try to copy it from there, but to my surprise, linux couldnt copy it straight to my FAT 32 partition!!!!

I could copy them to root and rename them and then copy them to my FAT32, but that is gonna take forever! Many files on a collection of 8 CDs!!

The stupid part is the fact that I can make as many copies that I want from the CDs, but I just don't want to pop a new CD everytime I need something from the collection. so PLEASE help!!

Head over to Microsoft and download Robocopy.

Put the robocopy file into you System32 folder.

Copy the text below to a text file

Replace "D:\" with the source (keep the quotes)

Replace "C:\folder" with the destination (keep the quotes)

robocopy.exe /R:0 /W:0 "D:\" "C:\folder" /S /ZB /COPY:DAT /TEE
pause

Rename the text file copy.cmd

Run this file

Change CD and rerun the file

  MazX_Napalm said:
Head over to Microsoft and download Robocopy.

Put the robocopy file into you System32 folder.

Copy the text below to a text file

Replace "D:\" with the source (keep the quotes)

Replace "C:\folder" with the destination (keep the quotes)

robocopy.exe /R:0 /W:0 "D:\" "C:\folder" /S /ZB /COPY:DAT /TEE
 pause

Rename the text file copy.cmd

Run this file

Change CD and rerun the file

trying as we speak!

fingers crossed:)

:( not working

I get:

ERROR: NO DESTINATION DIRECTORY SPECIFIED.

My CD rom here is drive G

and I first just ran it, thinking it would make a folder named "folder" in C, but when I got this error, I made the folder just in case, but still no work

this is the file I am running right now:

"robocopy.exe /R:0 /W:0 "G:\" "C:\folder" /S /ZB /COPY:DAT /TEE

pause"

and I also copied "robocopy.exe" AND "robocopy.doc"!!! into system 32 folder, as you mentioned.

what am I missing? i am gonna read the document when I get home, it looks pretty long!

Edited by MetaLRasaM

Sorry, I forgot that when copying from a root you need to use the /mir switch

robocopy.exe /R:0 /W:0 "D:\" "C:\folder" /S /ZB /COPY:DAT /TEE /mir
pause

You don't need to create the destination. If it doesn't exist the robocopy will create it.

You only need to copy the .exe to system32.

Good idea reading the documentation, it covers every switch there is.

  MazX_Napalm said:
Sorry, I forgot that when copying from a root you need to use the /mir switch

robocopy.exe /R:0 /W:0 "D:\" "C:\folder" /S /ZB /COPY:DAT /TEE /mir
 pause

You don't need to create the destination. If it doesn't exist the robocopy will create it.

You only need to copy the .exe to system32.

Good idea reading the documentation, it covers every switch there is.

ok, so one problem solved...

you dont need the quotes!

this code workd:

"robocopy.exe /R:0 /W:0 G:\ C:\folder /S /ZB /COPY:DAT /TEE /mir

pause"

HOWEVER, i get the same error...synthax error...it doesnt copy the files with | in their names!!

this is the most annoying problem EVER!!

I don't think you'll be able to get them off since the pipe "|" is an invalid file on the fat32 and ntfs file systems - in fact I don't think it is a legal character for the iso 9660 standard either (for CDs) - one option you might be able to do is use another OS such as linux and mac os x (no clue if they can handle it) and see if you can copy/rename the files. Also - you might be able to use a program like IsoBuster and see if it can extract the data off the cd.

Good luck.

EDIT: Just noticed you already tried using linux - while it could work, maybe someone could write up a script to rename the files for you once they are copied? I know the linux shell is powerful, it has been a bit since I've done any scripting in there.

Um... " | " is not a valid character for a filename in windows no, but sure it is in linux, you just need to escape it first, ie \|

See here

post-14624-1172642429.jpg

you should be able to copy the file just fine in linux off the CD..

cp testfile\|.txt copy.txt

what is the shortfile name for the file.. you can view that with dir /x

/X This displays the short names generated for non-8dot3 file

names. The format is that of /N with the short name inserted

before the long name. If no short name is present, blanks are

displayed in its place.

If that works -- than copy it to a new file name on your hard drive using the shortname to some valid name..

Ie copy g:\test~1.txt c:\newfile.txt

edit: Or have you tried just using a placehold for the invalid character.. ie copy testfile?.txt new.txt

Edited by BudMan
  BudMan said:
Um... " | " is not a valid character for a filename in windows no, but sure it is in linux, you just need to escape it first, ie \|

See here

post-14624-1172642429.jpg

you should be able to copy the file just fine in linux off the CD..

cp testfile\|.txt copy.txt

what is the shortfile name for the file.. you can view that with dir /x

/X This displays the short names generated for non-8dot3 file

names. The format is that of /N with the short name inserted

before the long name. If no short name is present, blanks are

displayed in its place.

If that works -- than copy it to a new file name on your hard drive using the shortname to some valid name..

Ie copy g:\test~1.txt c:\newfile.txt

edit: Or have you tried just using a placehold for the invalid character.. ie copy testfile?.txt new.txt

OK, i can see where you are going wrong here

my understanding of linux of VERY limited!! I know simple comands and I have a couple of different LIVE CDs around my PC, but almost everything you mentioned in your post just went over my head!

I cant have a linux OS running on my pc, i can only do LIVE CDs. and with live CD, i couldnt copy the files from the CD to my FAT 32 partition, i have no clue why

do you have a command where i can copy files but remove "|" before copying them? or something like that?

help!:( this thing is driving me INSANE!

Where am "I" going wrong?? I assure you there was nothing wrong with the information I gave you! Your understanding of it is the only thing lacking.

So you only have 1 CD or DVD drive? So your saying you can not access the CD with the weird filenames at the same time your running linux? How about a virtual machine?

Did you try just using a wildcard or placeholder for the " | " using normal windows commandline? ie ? or * for the character? What does dir /x show for the file names under just a plain ole windows command prompt?

I am having a hard time understanding what would of created 300 some file names with pipe " | " in the name? Can you post a screen shot of this?

When I access a file having a " | " in the name from windows using either a samba share or sftp -- the file is renamed so that windows understands it..

Example Here is that same file accessed using samba

post-14624-1172796656.jpg

Here is the file thru a sftp connection.

post-14624-1172797028_thumb.jpg

In windows access your CD from a command prompt do a dir /x where these file are -- what does windows show? Post screen shot.

Hey BudMan, sorry if I wasnt clear enough, when I said "i can see where you are going wrong here" I was trying to be funny in suggesting that I HAVE NO IDEA what you are talking about, but clearly when I separated my two sentences, my joke was lost in it!

I cant provide a screenshot right now, but here is a much better explanation of my problem:

I have 8 CDs that have alot of tiney programs. I got these CDs from a friend. there is 8 of them. so I wanted to copy them all in my HDD, for quicker access.

When I tried to just copy and paste them in Windows, I would get that syntax error. So I naturally thought the CDs are encrypted, therefore it doesn't let me copy them. So I tried some programs to crack the CDs and they didnt work. What was shocking to me was the fact that the programs couldnt tell that the CDs were encrypted.

I gave up. But after a week, and me being a nerd and ****ed off about having to go thru 8 CDs when I am looking for a file, I decided to really get into it.

I quickly noticed that all the EXE files in the CD had a "|" in them. I guess I never really looked at the names that carefully, I then remembered that Windows is a bitch when it comes to characters like that.

So I loaded up my Linux live CD, on my OTHER PC, which has two CD roms, and tried to copy them into my FAT 32 partition. It didnt work!

Windows reads the files, no problem. It just doesnt copy them. Linux also reads them, but doesnt copy them into a FAT 32 drive. I could however copy them into the ROOT that live CD makes, and then rename them and copy them back to the FAT 32 drive, but that is gonna take forever.

now to answer your questions,

first of all, thanks a million for taking the time, Neowin is not like it used to be these days

I can use my other PC which has two CD drives.

I have never worked with Virtual machine, I know MS bought them, and I know you can emulate windows in it?

Also ALL THE FILES are FORMATED LIKE THIS:

"|Setup|.exe"

it has TWO "|" in them, one to start and one before extension.

Imagine a CD with bunch of little apps, but all the setup and EXE files have TWO "|" characters in them. one to start and one before extension.

No idea about Samba, but FTP was my next move.

post-51486-1172799986_thumb.jpg

Where did your friend get these CDs? Is it possible for me to get access to one of them? Could you put a ISO of one of them or something?

These are all screen shots of the dirs.. can you give one that shows the actual exe file ie |setup|.exe ??

You say you can not copy them directly to the FAT32 partition.. Can you copy files without the |'s in the name to the fat32 filesystem?

  BudMan said:
Where did your friend get these CDs? Is it possible for me to get access to one of them? Could you put a ISO of one of them or something?

These are all screen shots of the dirs.. can you give one that shows the actual exe file ie |setup|.exe ??

You say you can not copy them directly to the FAT32 partition.. Can you copy files without the |'s in the name to the fat32 filesystem?

He got them from the mid-east

Sorry, I thought I went into the directory:S

Yes, my work around is that I copy them from the CD into LIVE CDs Root, rename and then copy them into fat 32 from Linux

this, by far is one of the most effective ways i have ever seen to make sure you cant copy a file into your HDD! its insane!

post-51486-1172803752_thumb.jpg

I would expect that your live disc ought to have some file sharing capabilities on it. Samba would probably be the easiest since it connects with Windows Explorer so easily, but at the very least you should be able to get httpd or ftpd to do the trick. As BudMan has shown, when you connect to the PC running Linux from a Windows machine remotely, the names get automatically altered. Copying from there should be a breeze. :)

How you'd set that up depends entirely on which distro and version of Linux you have, but what you'll want to do is share your /mnt/cdrom or /media/cdrom directory (cdrom may have a number after it as well, since you have more than one drive). Most modern distributions have some graphical utlities to guide you along the way, so it shouldn't be too difficult. :yes:

OK, so no luck trying to copy it from live CD into my other windows PC over SMB, I will try to connect to Linux from my Windows machine now. FYI, I got an error trying to copy the files with "|" in them, this is AMAZING! a huge pain in the ass!

p.s.

I have a new found respect for linux distros, I am now using Knoppix, and WOW! Its amazing, feature packed and just insane! I am using the 700MB one, I cant even imagine how much stuff is in the DVD version.

you guys know an easy way to connect to Linux from XP pro?

I am tired and I tried SSH and its almost impossible, I also HATE PUTTY!! I think ill end up using it anyways:( I am thinking maybe I should just ISO the CDs and have them mounted to my PC with Power ISO or something, this is becoming a HUGE pain and taking too much time.

PLEASE ISO the CD's and post them where I can download one -- I have little use for the warez you have on them, most of what I saw on your post was junk!

But I want to see what your talking about.. And to be able to see what dealing with would be great.. I can give you a server to upload too, if you would be up for it...

Not sure why your having such an issue.. Sure they are weird filenames, and | is not a very common used character in a file name, and yeah can cause windows issues.. But so just rename them -- if I could have a look see to what your dealing with, I am sure I could give you a very simple solution ;)

PM me if you would like the details of where to upload a ISO, if you can not put it up for download.

As to your nasty comment about putty?????? What??? Putty is the standard for a ssh client on the windows platform.. sorry if your limited on that platform -- move away from it if you find it restrictive ;)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Looks like "LoucheBear" should be renamed "DoucheBear". Ignorant ######.
    • The dev is a snowflake for deciding that a project he’s not getting paid to do isn’t worth the attacks? Interesting.
    • Microsoft explains how organizations can use Intune to upgrade from Windows 10 to Windows 11 by Usama Jawad The timer for Windows 10's end of life is counting down and while organizations can pay for Extended Security Updates (ESU), it might not be financially feasible for them to do so. In cases like these, it is in both the enterprise customer and Microsoft's benefit to upgrade to Windows 11 as seamlessly as possible. To that end, the Redmond tech giant has published a detailed guide explaining how companies can upgrade to Windows 11 through Intune. Microsoft has emphasized that this guide is primarily intended for domain-joined or co-joined Windows 10 PCs in order to perform a cloud-native migration to a state where the device is running on Windows 11 and is Entra-joined with Intune. To get started, customers obviously need to confirm that their hardware meets the requirements for Windows 11, which includes the dreaded TPM 2.0. This can be confirmed through Microsoft Configuration Manager or Endpoint Analytics in Intune. In addition, tools like Windows Autopatch, Configuration Manager, and Windows Server Update Services (WSUS) should be employed to update Windows 10 devices to the latest supported version, which is version 22H2. IT admins should also synchronize identities from Active Directory (AD) to Entra ID, configure and validate a hybrid join, prepare the Intune environment with the required licenses and admin roles, and enable co-management in Intune and Configuration Manager. Next, Group Policy Objects (GPOs) should be rationalized, redundant policies should be replaced, Intune configuration profiles should be set up, and Intune policies should be configured to deploy the update in phases. Then, Windows Autopatch should be leveraged to deliver the update and monitor the rollout. Applications should also be migrated from Configuration Manager to Intune for packaging, testing, deploying, and assigning them to the correct device groups. IT admins should also be vigilant in decommissioning the old deployments in Configuration Manager and updating the relevant documentation. The final step of this process involves transitioning from a domain network-joined setup to Entra ID-joined. This is a multi-step process, so make sure to check out the details here. Microsoft believes that this cloud-native migration approach will ensure centralized and streamlined management, enhanced security, an optimized UX, reduced reliance on legacy infrastructure, and allow IT admins to leverage Copilot in Intune.
    • ^ this (though I use Firefox). So tired of this "AI" being shoved into every damn thing. Copilot/Gemini....sick of it all. I am fully convinced it's just a way to mine and sell your data... unfettered ... under the guise of AI. I hate conspiracy theories...but there it is.
    • This is really the snowflake generation, isn’t it yes, whatever you do publicly, there will always be haters. Sad but true. Yes, I’ve lead such a project too.
  • Recent Achievements

    • Week One Done
      NeoWeen earned a badge
      Week One Done
    • One Month Later
      BA the Curmudgeon earned a badge
      One Month Later
    • First Post
      Doreen768 earned a badge
      First Post
    • One Month Later
      James_kobe earned a badge
      One Month Later
    • Week One Done
      James_kobe earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      656
    2. 2
      ATLien_0
      253
    3. 3
      Xenon
      167
    4. 4
      neufuse
      147
    5. 5
      +FloatingFatMan
      121
  • Tell a friend

    Love Neowin? Tell a friend!