• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

Batch Command Assistance

Below is what I have so far in my batch file and what I need to happen when the batch file is selected.  The general idea is this:
1) I need to be able to grab a file from an internal SVN Repository and download it to my desktop
2) I need the command prompt to have the user enter the YYYYMM and then have that entry be used for a command line executable
3) Then another command line executable needs to run in order to rename and encrypt the file
4) I then need the file to be copied to locations where everything in the path is the same except for the last folder, which the user will need to be prompted to enter
5) When the file has been copied to its necessary locations, it needs to be deleted from the desktop.

Batch File
 |
 |
\ /
--------------------------------------------------------------------------------------------------------------
@echo off
echo This batch file will:
echo 1. Get the latest "ArgosyDefault.txt" file from subversion and copy to Desktop
echo 2. Append the header to match Smart Match directory date and change the filename to "ArgosyMonthly.txt" using PrependVersion.exe utility
echo 4. Encrypt the file and change filetype to .lcs using EncryptREP.exe utility
echo 5. Copy the resulting encrypted file to "F:\Xtl Database Creation Cycle-L\Output\Build YMMV\"
echo 6. Copy the resulting encrypted file to "F:\Xtl Database Creation Cycle-L2\Output\Build YMMV\"
echo 7. Delete "ArgosyDefault.txt", "ArgosyMonthly.txt" and "ArgosyMonthly.lcs" from Desktop

@echo on

# Get ArgosyDefault.txt file from: https://scm.raf.com/repo/ArgosyPost/trunk/Code/data/ArgosyDefault.txt (Internal SVN Repository)
# Place file on Desktop
# Have user enter the directory year and month (YYYYMM) to be used as the header for the file
# Use the PrependVersion.exe utility to rename "ArgosyDefault.txt" to "ArgosyMonthly.txt" and add the date header from the previous step to the file (PrependVersion.exe ArgosyDefault.txt
# ArgosyMonthly.txt -d YYYYMM)
# Run the EncryptREP.exe utility (EncryptREP.exe -x lcs ArgosyMonthly.txt)
# Copy the resulting encrypted file to the appropriate build folder "F:\Xtl Database Creation Cycle-L\Output\Build YMMV\" (Prompt will need to have user specify what the build is, but the rest of the path
# will remain the same------YMMV equals Year-Month-Month-Version)
# Copy the resulting encrypted file to the appropriate build folder "F:\Xtl Database Creation Cycle-L2\Output\Build YMMV\"  (Prompt will need to have user specify what the build is, but the rest of the path #will remain the same------YMMV equals Year-Month-Month-Version)
# Copy the resulting encrypted file to the appropriate build folder "F:\Xtl Database Creation Cycle-M\Output\Build YMMV\"  (Prompt will need to have user specify what the build is, but the rest of the path #will remain the same------YMMV equals Year-Month-Month-Version)
#
# Delete the source files from the desktop
#
#
#
#
#
?I already placed PrependVersion.exe and EncryptREP.exe in the temp folder and added it to CLASSPATH so it can be run from anywhere
?Need to include how to get file from SVN
?Need to require user to enter YYYYMM for PrependVersion.exe
?Need to be able to place encrypted file in appropriate build folder for that month's directory
--------------------------------------------------------------------------------------------------------------------------------------

Thanks a bunch.
0
Zherebets
Asked:
Zherebets
  • 3
1 Solution
 
SysExpertCommented:
I would use Auto-it to first record the steps and then to play it back with the prompt options etc.

auto-it Free scripting tool, keyboard macros  and compiled exe files

http://www.autoitscript.com/autoit3/

http://www.autoitscript.com/

I hope this helps !
0
 
ZherebetsAuthor Commented:
Thank you for the link, but my knowledge is still too basic to use this tool effectively for what I need.
0
 
ZherebetsAuthor Commented:
I was able to research this issue myself and compile a batch file.
0
 
ZherebetsAuthor Commented:
I was able to research and compile a batch file for my needs without assistance
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now