user2774000
user2774000

Reputation: 5

VB Renaming Files with 2 textbox inputs

I am trying to use 2 textboxes in a form to Rename Files, but keep getting "Expression Expected". The first & & is the name of a server and the second & & is the original name of the file. The reason I need them to be textboxes is because those names constantly change.

My.Computer.FileSystem.RenameFile("D:\File1\" & S2Prim.Text & "_Working\Backup\" & PSG.Text &, "group.txt")

Upvotes: 0

Views: 139

Answers (1)

Damian Kobak
Damian Kobak

Reputation: 380

You have an extra & character at the end of the first parameter:

"D:\File1\" & S2Prim.Text & "_Working\Backup\" & PSG.Text &

Upvotes: 2

Related Questions