Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Need to move file from one folder to another. The issue is on moving the file into destination folder with MMYYYY folder format(03-2009)
Set state= HUD
Set Month = 3
set year=2009et filesource=\\pdx-file\Outbound\hud
set filedest=\\pdx-file\template\Properties\hudecho ---------------Start-of-Record--------------- >> %logfile%
date /t >> %logfile%
time /t >> %logfile%REM Copy over AP, CO, MS, PF, C, R, & VC .PDF files from property server to property folder on PDX-FILE
do XCOPY /S /I /Y "%filesource%\%%~A\*.pdf" "%filedest%\%state%\%%~A\Attachments\PayInvoice\%MM-year%\*.*" >> %logfile%
IF ERRORLEVEL 5 GOTO Problems
IF ERRORLEVEL 4 GOTO Problems
IF ERRORLEVEL 2 GOTO Cancel
IF ERRORLEVEL 1 GOTO NoFiles
IF ERRORLEVEL 0 GOTO OK:Problems
ECHO Possible error. >> %logfile%
ECHO Modified/New files have not been backed up. >> %logfile%
GOTO end:Cancel
ECHO Copying process terminated. >> %logfile%
GOTO end:NoFiles
ECHO No files found to copy. >> %logfile%
GOTO end:OK
Echo Move files to Backup folder
XCOPY /S /I /Y "%filesource%\*.pdf" "%backupsource%\*.*" >> %logfile%

What's the question?
=====================================
If at first you don't succeed, you're about average.M2

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

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