Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
this is the third time that i will be posting this msg.. i dont know but for some reason my post gets deleted!
i have a 100% working script below.. however, i want the isoissue to pick up from a list of variables from a separate list.txt file.. needless to say, this script should pick up the list one-by-one, run and loop the script until all the variables for isoissue has been processed..
list.txt would have something like this:
rr04cxpl109123
rr04cxpl109456
rr04cxpl109784
rr04cxpl109956
rr04cxpl109978
rr04cxpl109907
@echo off
title AUTOMATED ISO COPY:: Type/Scan barcode and check AFC_area
Set "isoissue=rr04cxpl109902"
Set "AFC_area=RR04_ULD2":: Type transmittal number and AFC folder and date
Set "transmittal_no=RR04_A2ZC_SO04-005"
Set "AFC_date=Week 4 (10052008)":SAVE THE FILE AND RUN THE SHORTCUT ON YOUR DESKTOP:::::::::::::::::::::::::::::::::::::
Set "sourceDir=\\server1\isometrics"
Set "TOPOLFolder=\\server2\ca_a2zc\250_Pipe\250H - Deliverables\Isometrics Issued\TO_POL"
Set "HOAFCFolder=\\server3\ho_a2zc\250_Pipe\Calgary Iso's\AFC"
Set "HOMATFolder=\\server3\ho_a2zc\250_Pipe\Calgary Iso's\Material Electronic Files"
Set "CAAFCFolder=\\server2\ca_a2zc\250_Pipe\250H - Deliverables\Isometrics Issued"
Set "_report=\\server1\isometrics\logxcopy.txt"
IF NOT EXIST "%sourceDir%" (echo.Could not find %sourceDir% &GoTo:done):: append previous log
>>"%_report%" (
echo.%date% - %time%
---
echo.
):: copy files for POL Transfer
For /F "Delims=" %%! in ('Dir "%sourceDir%\%isoissue%.i*" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%TOPOLFolder%\%AFC_date%\%transmittal_no%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy transmittal for POL Transfer
For /F "Delims=" %%! in ('Dir "%sourceDir%\%transmittal_no%.pdf" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%TOPOLFolder%\%AFC_date%\%transmittal_no%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy transmittal to HO AFC
For /F "Delims=" %%! in ('Dir "%sourceDir%\%transmittal_no%.pdf" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%HOAFCFolder%\%AFC_area%\%AFC_date%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy files to HO AFC
For /F "Delims=" %%! in ('Dir "%sourceDir%\%isoissue%.i*" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%HOAFCFolder%\%AFC_area%\%AFC_date%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy files to MAT AFC
For /F "Delims=" %%! in ('Dir "%sourceDir%\%isoissue%*.*" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%HOMATFolder%\%AFC_area%\%AFC_date%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy files to CA AFC for Backup
For /F "Delims=" %%! in ('Dir "%sourceDir%\%isoissue%*.*" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%CAAFCFolder%\%transmittal_no%\" /i /y /h /f /c >>"%_report%",2>&1)
):: copy Transmittal to CA AFC for Backup
For /F "Delims=" %%! in ('Dir "%sourceDir%\%transmittal_no%.pdf" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%CAAFCFolder%\%transmittal_no%\" /i /y /h /f /c >>"%_report%",2>&1)
):done
title,Done.......echo.&pause>nul
hopeless but trying

To be honest I haven't pored over your script thoroughly enough to understand it all but I think I know what you need to change.
This:
title AUTOMATED ISO COPY:: Type/Scan barcode and check AFC_area
Set "isoissue=rr04cxpl109902"To this:
title AUTOMATED ISO COPY
for /f %%g in (yourtextfile.txt) do call :body %%G
goto :eof:body
:: Type/Scan barcode and check AFC_area
Set "isoissue=%1"And this:
:done
title,Done.......echo.&pause>nul
To this:
:done
title,Done.......echo.&pause>nul
goto :eof

Thanks Judago for trying to help. I tried editing the script and adding as you have advised. While it doesnt seem to give any error, it doesnt seem to go through the list either. Do I need to put anything special on my list.txt? Regards - M
hopeless but trying

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |