Results 1 to 15 of 15

Thread: Batch file fails to xcopy outlook data

  1. #1
    Regular Member
    Join Date
    Feb 2001
    Posts
    229

    Batch file fails to xcopy outlook data

    Hola:
    Surely I'm doing a stupid mistake, but I can not get this batch file working.
    I found the backup file in this site, modified it to my needs and it seems to work fine except for the outlook part. The line in the .bat file that has got to do with outlook express reads like this:
    %backupcmd% "%USERPROFILE%\Configuración local\Datos de programa\Identities" "%drive%\Outlook Express"
    As you notice I've changed the name of the folders to suit my needs; but whenever I run this backup program it tells me that can not find Identities.
    What am I doing wrong?

  2. #2
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    If you use Windows Explorer to navigate to the "Identities" dir, does it exist?

    Post your entire batch file,
    and what OS you're working in.

  3. #3
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    I am using the backup file that I found in this site, modified it to suit my needs.
    This is the .bat file:

    @echo off
    :: variables
    set drive=d:\Backup
    set backupcmd=xcopy /s /c /d /e /h /i /r /k /y

    echo ### Guardando mis documentos...
    %backupcmd% "%USERPROFILE%\Mis documentos" "%drive%\Mis documentos"

    echo ### Guardando Favoritos...
    %backupcmd% "%USERPROFILE%\Favoritos" "%drive%\Favoritos"

    echo ### Guardando Correo y libreta de direcciones (Outlook Express)...
    %backupcmd% "%USERPROFILE%\Datos de programa\Microsoft\Address Book" "%drive%\Address Book"
    %backupcmd% "%USERPROFILE%\Configuración local\Datos de programa\Identities" "%drive%\Outlook Express"

    echo ### Backing up the Registry...
    if not exist "%drive%\Registry" mkdir "%drive%\Registry"
    if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg"
    regedit /e "%drive%\Registry\regbackup.reg"

    echo ### Copiando directorios
    %backupcmd% "c:\mbeur" "%drive%\mbeur"
    :: use below syntax to backup other directories...
    :: %backupcmd% "c:\mbeur" "%drive%\mbeur"

    echo Backup Complete!
    @pause

    Everything works except the outlook part. I even tried to do a backup straight with this line:

    xcopy "C:\Documents and Settings\Miguel\Configuración local\Datos de programa\Identities\{FF9082C5-4D15-4DFA-97C8-76FA3EDF4000}\Microsoft\Outlook Express" "d:\yyy" /e /y

    But didn't work either. In this last case I got the Outlook Express file not found.

    I'm using Windows XP pro, and yes, the folder Identities does exist.
    Thanks

  4. #4
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    It looks good to me. Can't figure why it can't find Identities.

    All I can think of (since I do not know the language you speak) is to check your spelling for the entire path to identities dir.
    Navigate to the identities dir in Explorer, then copy/paste the path from the address bar. Might help 'if it is' a spelling mistake.
    Last edited by Norm; 02-13-05 at 01:54 PM.

  5. #5
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    Hi, norm:

    Keep thinking that I've made a mistake, but I can not find it.
    My native language is spanish (I beg you to excuse my bad english), so I changed the original batch file accordingly. Instead of Local Settings in spanish you read Configuración Local, and so on.
    In order to avoid spelling mistakes I copied and pasted the entire address of the Outlook folder:
    C:\Documents and Settings\Miguel\Configuración local\Datos de programa\Identities\{FF9082C5-4D15-4DFA-97C8-76FA3EDF4000}\Microsoft\Outlook Express
    But to no avail, I keep getting the "Outlook Express folder not found" error....
    Thanks

  6. #6
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    Hi again...


    I'm assuming the batch file you're using is the one I wrote..
    I stopped at the "Identities dir because I wasn't sure the "{FF9082C5-4D15-4DFA-97C8-76FA3EDF4000}" dir was the same for every user. Plus it includes all users OE files.

    Instead of going all the way to Outlook Express in the path, try again to the Identies dir using the copy/paste method.

    The ONLY other thing I can think of is that the "Local Settings dir is a hidden dir. Maybe you need to include an attrib command to "unhide" it and it's subfolders before the xcopy command.

    btw - Your english needs absolutely no excusing, it's better than most english speaking members here.
    I would never have known you're Spanish.

    Another thought came to mind as I considered the fact your system uses Spanish. maybe there are 'special' characters being used, and not recognized by the command interpreter (don't know, just a thought)

  7. #7
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    I'm honoured to be talking to the creator of that batch file, no joking, I've found it to be real util.
    Pity that Outlook Express matter...
    As you suggest, I was giving thought to that special character question; it might be the answer to all of this.
    As you know spanish language use some special characters, like the "ó" in the "Configuración local" folder. It could be that batch files get confused when they found that kind of characters as part of a folder name.
    I'm going to try and see what comes out of this.
    I shall post my findings.
    Anyway, thanks for your help

  8. #8
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    Hola:
    It looks like the culprit was the"ó".
    I've done a test trying to backup a folder with a special character in its name "c:\mía". But no matter how I tried, I always received the "folder not found" error message. Changin the name of the folder to "c:\mia" amended things.
    So, now we know the reason of the fail.
    My question, now, is:
    Is there a way to make batch files recognize special characters?
    Thanks

  9. #9
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    You could try going to Start>Run

    Code:
    %systemroot%\hh.exe mk:@MSITStore: %systemroot%\help\ms-its:ntcmds.chm::/country.htm
    That will take you to the Country command syntax page with some instructions on how to use it. I've never tried working with that command myself and can't be sure it will solve your problem.

    It does state this:
    "The country command configures the MS-DOS subsystem to recognize the character set and punctuation conventions observed when using one of the supported languages. Use the %systemroot%\System32\Config.nt file, or the equivalent startup file specified in a program's program information file (PIF), to load the Country/Region setting."

    Good luck.

    If that doesn't work out, you may be able to search the registry for that special character and replace it with something else, which in effect would change the character in each path that uses it.

  10. #10
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    Hello:

    I'm afraid that changing characters wouldn't do any good. As you know most of european languajes use them (ñ, é, ü, ç...). In spanish, for example, "qué" and "que" are different words, so we must use those characters.

    I'm thinking of trying windows scripting languaje; no that I am proficient with it.

    Anyway thanks for your help, and time.

  11. #11
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    You are welcome Gort9k. It's been a pleasure talking to you.
    I hope you can find a solution one way or another.

    Don't hesitate to ask if you have any further questions I can help with.
    See you around the forum


    Norm

  12. #12
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    I had a brainstorm. I just couldn't rest and leave you without a solution.
    Dos rocks

    Use the Dos path instead of the long name. Use the Dos truncated name.
    The old 8.3 filename convention. Dos takes the first 6 characters, and adds ~1 ~2 etc depending on if there is more than one file or folder using the same 6 characters in the name.

    eg:
    "%USERPROFILE%\Configuración local\Datos de programa\Identities"

    becomes

    "%USERPROFILE%\Config~1\Datos de programa\Identities"


    or all folders

    "%USERPROFILE%\Config~1\Datosd~1\Identi~1" "%drive%\Outlook Express"


    Using the Dos path takes care of the problem with special character in the long name (hopefully)

    Let me know if it works for you.

  13. #13
    use edit.com to create the .bat

  14. #14
    Regular Member
    Join Date
    Feb 2001
    Posts
    229
    Quote Originally Posted by Norm View Post
    I had a brainstorm. I just couldn't rest and leave you without a solution.
    Dos rocks

    Use the Dos path instead of the long name. Use the Dos truncated name.
    The old 8.3 filename convention. Dos takes the first 6 characters, and adds ~1 ~2 etc depending on if there is more than one file or folder using the same 6 characters in the name.

    eg:
    "%USERPROFILE%\Configuración local\Datos de programa\Identities"

    becomes

    "%USERPROFILE%\Config~1\Datos de programa\Identities"



    or all folders

    "%USERPROFILE%\Config~1\Datosd~1\Identi~1" "%drive%\Outlook Express"


    Using the Dos path takes care of the problem with special character in the long name (hopefully)

    Let me know if it works for you.
    You were right, Norm.

    Using DOS path did the trick. Now I can use xcopy at will.

    Thanks a lot

  15. #15
    Quote Originally Posted by Norm View Post
    I had a brainstorm. I just couldn't rest and leave you without a solution.
    Dos rocks

    Use the Dos path instead of the long name. Use the Dos truncated name.
    The old 8.3 filename convention. Dos takes the first 6 characters, and adds ~1 ~2 etc depending on if there is more than one file or folder using the same 6 characters in the name.

    eg:
    "%USERPROFILE%\Configuración local\Datos de programa\Identities"

    becomes

    "%USERPROFILE%\Config~1\Datos de programa\Identities"


    or all folders

    "%USERPROFILE%\Config~1\Datosd~1\Identi~1" "%drive%\Outlook Express"


    Using the Dos path takes care of the problem with special character in the long name (hopefully)

    Let me know if it works for you.
    Hey man, thanks a lot for this! You saved my life I was going mad

Similar Threads

  1. DOS Batch file help
    By Jon in forum Programming Forum
    Replies: 2
    Last Post: 06-04-04, 06:15 AM
  2. microsofts hidden files.
    By rrrjr in forum Network Security
    Replies: 8
    Last Post: 04-08-04, 03:47 AM
  3. Copy Protection ??
    By Richard(UK) in forum Gaming
    Replies: 7
    Last Post: 02-28-04, 04:58 PM
  4. Outlook 2002 Backup
    By Tuz76 in forum Software Forum
    Replies: 2
    Last Post: 12-05-01, 10:27 AM
  5. Security and Encryption FAQ Revision 15 by Doctor Who
    By Marine06 in forum Network Security
    Replies: 1
    Last Post: 02-19-01, 10:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •