VBscript copy file to different location

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
sid58ney
Enthusiast
Posts: 8
Joined: Sat Sep 23, 2017 6:22 pm

VBscript copy file to different location

Post by sid58ney » Mon Jun 08, 2020 11:55 pm

Hi,

I run the simple VBscript to copy the file to a different location while the label print. Every time it triggers, it always ask me to select the file. Can I just run the copy without choosing which file?

Thanks,

Option Explicit
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Nicelabel test\test.csv", "P:\Veerpal\Sabre Battery Seal_Shutdown Serial_Number_List\"

Capture.JPG
Capture.JPG (42.19 KiB) Viewed 169 times

User avatar
Mytch
NiceLabel Support
NiceLabel Support
Posts: 153
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin
Contact:

Re: VBscript copy file to different location

Post by Mytch » Wed Jun 10, 2020 2:22 am

sid58ney,

I just tried this and it's working fine for me (no prompt). Which version of Automation is installed and how exactly are the Trigger Actions configured?

Maybe you don't have permissions to the file or destination. Deployed Automation Triggers will run as a service - not the current logged on user. You can check the 'Log on as' account of NiceLabel Automation Service 2019 (or 2017). Maybe this is set to Local System account and you can change it to some permissible user account instead. Then, try to restart the service and deploy the Trigger once more.

Regards,
Mytch

Post Reply