Renaming a file using the Shell function in Visual Basic (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Renaming a file using the Shell function in Visual Basic
|
|
|
|
Renaming a file using the Shell function in Visual Basic 2 Years, 7 Months ago
|
Karma: 0
|
|
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. <BR>
thanks for any help <BR>
JoAnn <p><!--mccodelink_begin--> <BR>
<!-- do not remove --> <BR>
<hr width=50 align=left><small><a href='http://www.mcpressonline.com/mc/showcode@@.6b36f9e1' target='_blank'>Code</a></small> <BR>
<!--mccodelink_end-->
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
Renaming a file using the Shell function in Visual Basic 2 Years, 7 Months ago
|
|
|
JoAnn Hansen wrote:<BR>
> I am trying to rename a file on the AS/400 using the Shell function<BR>
> to run a DOS rename. My command looks good in debug but will not run<BR>
> in VB6. I am posting my code below and would appreciate any help on<BR>
> the CMD syntax which I assume is my problem. My code is good and<BR>
> working up to the Shell. thanks for any help<BR>
> JoAnn<BR>
<P>
JoAnn,<BR>
<P>
What is the value of rtlbatch?<BR>
<P>
I'd recommend you use the Switch function instead of all of the If's.<BR>
There's always the possibility that all of you're If statements may not<BR>
pass, if that happens the field filename is going to be blank or False (I<BR>
forget which).<BR>
<P>
You should also consider using the Name function to do a rename since the<BR>
purpose of Shell is to kick off another program that runs on it's own and<BR>
that's really not what you are wanting to do.<BR>
<P>
Bill<BR>
<P>
<P>
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
|