Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch problem O_O (probably an obvious answer)  (Read 2852 times)

0 Members and 1 Guest are viewing this topic.

uberman

  • Guest
Batch problem O_O (probably an obvious answer)
« on: April 06, 2007, 10:14:28 PM »
How do you copy files into a directory that have a space [ ]  in the directory
gives me a syntax error and the files don't copy :(

help me please  ???

diablo416

  • Guest
Re: Batch problem O_O (probably an obvious answer)
« Reply #1 on: April 06, 2007, 10:48:05 PM »

theirs two ways, easyest way beeing to just put it in quotations..

@echo off
copy "c:\documents and settings\%username%\desktop\file.dll"


the next is ~1 , for example..

@echo off
copy c:\docume~1\%username%\desktop\file.dll ,


most files and folders have pre set ~1 with them, its usualy the first word minus the last letter of the first word plus ~1 , sometimes its the first word combined with a bit of the second and ~1 , cd userse~1
but it could be anything.

ghostdog74



    Specialist

    Thanked: 27
    Re: Batch problem O_O (probably an obvious answer)
    « Reply #2 on: April 06, 2007, 11:02:23 PM »
    put double quotes around the directory name

    uberman

    • Guest
    Re: Batch problem O_O (probably an obvious answer)
    « Reply #3 on: April 07, 2007, 12:07:26 AM »
    thank you :D

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Batch problem O_O (probably an obvious answer)
    « Reply #4 on: April 08, 2007, 08:45:15 PM »
    put double quotes around the directory name
    "copy c:\docume~1\%username%\desktop\file.dll"