Welcome to WinForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problème de syntaxe

 
   Win 2000/NT/98/ME (Home) -> MS DOS Apps RSS
Next:  Delete command help  
Author Message
Guillaume MARANDE

External


Since: Dec 09, 2005
Posts: 2



(Msg. 1) Posted: Fri Dec 09, 2005 10:14 am
Post subject: Problème de syntaxe
Archived from groups: microsoft>public>win95>msdosapps (more info?)

Bonjour,

Voilà mon problème :

J'ai un fichier bat où j'ai ceci dedans :

rem ******************************************
rem * Sauvegarde des fichiers pour Mageco *
rem ******************************************


rem @echo off
cd\
cls

setlocal


::Change these as necessary
set Source=H:\Soustrai\Mageco\Envoi\
set Dest=H:\Soustrai\Mageco\Envoi\Sauve\

if "%Source:~-1%" NEQ "\" set Source=%Source%\
if "%Dest:~-1%" NEQ "\" set Dest=%Dest%\

if not exist %Source% goto :Error
if not exist %Dest% goto :Error

set Today=%date:~0,2%%date:~3,2%%date:~6,4%

for %%z in (%Source%*.*) do call :ProcessFile "%%z"

goto :eof
:ProcessFile
set FilePath=%~1
set FileName=%~n1
set FileExt=%~x1

::Remove the echo from the next line to do the actual copy

copy "%FilePath%" "%Dest%%FileName%_%Today%%FileExt%"
c:
cd\


goto :eof

:Error
echo Either the source or destination directory does not exist


Quand je l'exécute à partir de WXP Pro cela fonctionne, mais dès que je le
passe sur un PC W98, il me m'ait des erreurs de syntaxes.

Quelqu'un pourrait-il m'aider ?

Merci d'avance.

Guillaume MARANDE

 >> Stay informed about: Problème de syntaxe 
Back to top
Login to vote
---DGI972---

External


Since: Dec 09, 2005
Posts: 1



(Msg. 2) Posted: Fri Dec 09, 2005 10:14 am
Post subject: Re: Problème_de_syntaxe [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Guillaume MARANDE a utilisé son clavier pour écrire :
> Bonjour,
>
> Voilà mon problème :
>
> J'ai un fichier bat où j'ai ceci dedans :
>
> rem ******************************************
> rem * Sauvegarde des fichiers pour Mageco *
> rem ******************************************
>
>
> rem @echo off
> cd\
> cls
>
> setlocal
>
>
> ::Change these as necessary
> set Source=H:\Soustrai\Mageco\Envoi\
> set Dest=H:\Soustrai\Mageco\Envoi\Sauve\
>
> if "%Source:~-1%" NEQ "\" set Source=%Source%\
> if "%Dest:~-1%" NEQ "\" set Dest=%Dest%\
>
> if not exist %Source% goto :Error
> if not exist %Dest% goto :Error
>
> set Today=%date:~0,2%%date:~3,2%%date:~6,4%
>
> for %%z in (%Source%*.*) do call :ProcessFile "%%z"
>
> goto :eof
> :ProcessFile
> set FilePath=%~1
> set FileName=%~n1
> set FileExt=%~x1
>
> ::Remove the echo from the next line to do the actual copy
>
> copy "%FilePath%" "%Dest%%FileName%_%Today%%FileExt%"
> c:
> cd\
>
>
> goto :eof
>
> :Error
> echo Either the source or destination directory does not exist
>
>
> Quand je l'exécute à partir de WXP Pro cela fonctionne, mais dès que je le
> passe sur un PC W98, il me m'ait des erreurs de syntaxes.
>
> Quelqu'un pourrait-il m'aider ?
>
> Merci d'avance.
>
> Guillaume MARANDE

Bonjour,
Il faut faire attention selon l'OS sur le format de la date dans la
ligne:
set Today=%date:~0,2%%date:~3,2%%date:~6,4%
Je me suis déjà fait avoir plusieur fois.
Bon courage

 >> Stay informed about: Problème de syntaxe 
Back to top
Login to vote
Guillaume MARANDE

External


Since: Dec 09, 2005
Posts: 2



(Msg. 3) Posted: Fri Dec 09, 2005 4:02 pm
Post subject: Re: Problème de syntaxe [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peux-tu me donner ta solution ?

Merci de ton aide.

Guillaume


"---DGI972---" <gilles.dermigny@*NOSPAM*laposte.net> a écrit dans le message
de news: mn.4a397d5c1901d45c.33554 DeleteThis @NOSPAMlaposte.net...
> Guillaume MARANDE a utilisé son clavier pour écrire :
>> Bonjour,
>>
>> Voilà mon problème :
>>
>> J'ai un fichier bat où j'ai ceci dedans :
>>
>> rem ******************************************
>> rem * Sauvegarde des fichiers pour Mageco *
>> rem ******************************************
>>
>>
>> rem @echo off
>> cd\
>> cls
>>
>> setlocal
>>
>>
>> ::Change these as necessary
>> set Source=H:\Soustrai\Mageco\Envoi\
>> set Dest=H:\Soustrai\Mageco\Envoi\Sauve\
>>
>> if "%Source:~-1%" NEQ "\" set Source=%Source%\
>> if "%Dest:~-1%" NEQ "\" set Dest=%Dest%\
>>
>> if not exist %Source% goto :Error
>> if not exist %Dest% goto :Error
>>
>> set Today=%date:~0,2%%date:~3,2%%date:~6,4%
>>
>> for %%z in (%Source%*.*) do call :ProcessFile "%%z"
>>
>> goto :eof
>> :ProcessFile
>> set FilePath=%~1
>> set FileName=%~n1
>> set FileExt=%~x1
>>
>> ::Remove the echo from the next line to do the actual copy
>>
>> copy "%FilePath%" "%Dest%%FileName%_%Today%%FileExt%"
>> c:
>> cd\
>>
>>
>> goto :eof
>>
>> :Error
>> echo Either the source or destination directory does not exist
>>
>>
>> Quand je l'exécute à partir de WXP Pro cela fonctionne, mais dès que je
>> le passe sur un PC W98, il me m'ait des erreurs de syntaxes.
>>
>> Quelqu'un pourrait-il m'aider ?
>>
>> Merci d'avance.
>>
>> Guillaume MARANDE
>
> Bonjour,
> Il faut faire attention selon l'OS sur le format de la date dans la ligne:
> set Today=%date:~0,2%%date:~3,2%%date:~6,4%
> Je me suis déjà fait avoir plusieur fois.
> Bon courage
>
>
 >> Stay informed about: Problème de syntaxe 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
cant setup hard drive - i cleanup my old hard drive. now i try to put my os in and i cant do it. i have a cd. it wont run. only the floppy runs. i dont know the name or letter of my hard drive how can i fix the prolbem

I can't get my window 95 to start - My windows 95 will not start up. I try to start the windows up bout all I get is different mode choices. I tried to do what the book told me to do but it still will not startup. What do I do?

my window 95 will not start - My window 95 will not start and i've tried to do what the instruction book told me to do but nothing will work. My window will have a menu that will say choice a command. When I choose a command nothing changes. What can I do?

help - I want to upgrade to win98 how can i do that. I have a old computer and can not run alot of thing for win98 or above. can someone tell me how or if it is posible to upgrade from win95 to win98 thank-you

win 95 cab file - Have been trying to install win95 but I get a message that cab files on disk 2 are missing.
   Win 2000/NT/98/ME (Home) -> MS DOS Apps All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows XP
 Windows Vista!
  Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]