The Copy function in Batch files which are used to copy files(.csv) from one drive to another drive which are used as inputs in Datastage
The name of the file is ActionCode_2007-5-7_16213.csv
IF EXIST %FileFromDrive%\ActionCode*.csv COPY %FileFromDrive%\ActionCode*.csv %FileToDrive%\ActionCode.csv /Y
When I am using this command in batch file to copy files from one drive to another, it copies the file and renames it, but when you look at the records in the file. A new record is added with a symbol "" in thelast row and the first column of the target file. ( is an arrow symbol).
Everytime the file comes in weekly, the date and the number changes.I have tried several ways in naming the file name. like the one above. then with date and *after the date , then with * and number at the end of the file name, but I was having the same error.
When you try copying using the whole file name, it is copying perfectly.
Can anyone help in resolving this issue about how to copy the file wihout the arrow symbol.
Copy files from one folder to another using.bat files
-
- Participant
- Posts: 20
- Joined: Thu Nov 16, 2006 1:32 pm
- Location: louisville
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: