Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Renaming a file using the Shell function in Visual Basic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Renaming a file using the Shell function in Visual Basic

    I am trying to rename a file on the AS/400 using the Shell function to run a DOS rename. My command looks good in debug but will not run in VB6. I am posting my code below and would appreciate any help on the CMD syntax which I assume is my problem. My code is good and working up to the Shell. thanks for any help JoAnn
    Code
    ________
    Babe Bikini
    Last edited by Diane Mueller; 03-29-2011, 10:48 AM.

  • #2
    Renaming a file using the Shell function in Visual Basic

    JoAnn Hansen wrote: > I am trying to rename a file on the AS/400 using the Shell function > to run a DOS rename. My command looks good in debug but will not run > in VB6. I am posting my code below and would appreciate any help on > the CMD syntax which I assume is my problem. My code is good and > working up to the Shell. thanks for any help > JoAnn JoAnn, What is the value of rtlbatch? I'd recommend you use the Switch function instead of all of the If's. There's always the possibility that all of you're If statements may not pass, if that happens the field filename is going to be blank or False (I forget which). You should also consider using the Name function to do a rename since the purpose of Shell is to kick off another program that runs on it's own and that's really not what you are wanting to do. Bill

    Comment

    Working...
    X