Find Jobs
Hire Freelancers

Batch file syntax error

$10-30 USD

已取消
已发布超过 10 年前

$10-30 USD

货到付款
I wrote this batch file and I am trying to get it to run in cmd prompt but I keep getting a syntax error on the FOR loop. I just want to copy files to computers on my network. Here is the code for the batch file. The complist file contains PC1 PC2 PC3 What is wrong? set FILE2COPY = C:\test1\[login to view URL] set COMPLIST = C:\test1\[login to view URL] for /f %%a in ("%COMPLIST%") do ( set WIN7 = \\%%a\c$\Program Files (x86)\test1 set WINXP = \\%%a\c$\1test if EXIST "%WIN7%" (set COPYDIR =%WIN7% ) else ( if EXIST "WINXP" ( set COPYDIR =%WINXP% ) else ( ECHO No such directory exists for computer %%a pause GOTO :END ) ) copy "%FILE2COPY%" "%COPYDIR%" /Y ) Pause :END
项目 ID: 5166140

关于此项目

7提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
7威客以平均价$27 USD来参与此工作竞价
用户头像
Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 !!)... you can never go wrong choosing me :) I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
$45 USD 在0天之内
5.0 (492条评论)
7.4
7.4
用户头像
Hi. I have great xp in cmd scripts. Would be glad to help you with this project. Regards, Yuri .
$35 USD 在2天之内
4.9 (34条评论)
4.5
4.5
用户头像
hi, I can help you ----------------------------------------------------------------------------------------------------------------------
$30 USD 在1天之内
5.0 (11条评论)
3.9
3.9
用户头像
Hello! I have identified and corrected several errors in your batch file. Basically, I can deliver you a corrected batch file within minutes after you award me the project and I accept it (please allow for time difference for initial contact). I have more than 20 years experience with PCs, going back to times of DOS when running batch files at command prompt were the only way one could automate things. I'm confident that I can do this job to your highest satisfaction. Best regards, Tom
$20 USD 在0天之内
5.0 (2条评论)
2.6
2.6
用户头像
Hello. What exactly are you trying to get your for loop to do? And could you also send the error you receive? Thank you for your time and I look forward to working with you. Edit: Offhand I can see that you will most likely need to use either quotes "" around Program Files (x86) or use a short filename such as PROGRA~2 in your path.
$20 USD 在0天之内
5.0 (1条评论)
0.6
0.6
用户头像
Will be done at 9:00 am gmt +1 thats exactly tomorrow morning. if you don't mind. Kind regards. Haris
$25 USD 在0天之内
0.0 (0条评论)
0.0
0.0
用户头像
10+ years IT experienced professional. will complete within short time period with best service and satisfaction guaranteed.
$15 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
flagstaff, United States
5.0
1
会员自7月 5, 2012起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。