I have excel in my local need to share that excel to shared network path for eg path is like this (\htrewg\sample\test)
need to copy excel with name( test_19-07-23_14:13pm.xlsx)
Please help anyone
I have excel in my local need to share that excel to shared network path for eg path is like this (\htrewg\sample\test)
need to copy excel with name( test_19-07-23_14:13pm.xlsx)
Please help anyone
Assign - NewFileName: “test_” + Now.ToString(“yy-MM-dd_HHmm”) + “.xlsx”
Copy the Excel file to the shared network path, you can use the “Copy File” activity. Provide the source file path (local path with the new file name) and the destination file path (shared network path) in the “Copy File” activity.
Make sure to use double backslashes for the shared network path in UiPath, like this: "\htrewg\sample\test".
Regards
Assign:
sourceFilePath = “C:\Path\To\Your\File.xlsx”
Assign:
destinationFileName = “test_” + Now.ToString(“dd-MM-yy_HHmm”) + “.xlsx”
Assign:
destinationFolderPath = “\htrewg\sample\test”
Assign:
destinationFilePath = Path.Combine(destinationFolderPath, destinationFileName)
Copy File:
Source = sourceFilePath
Destination = destinationFilePath
path not supported error coming.
Path for eg is (“\htrewg\sample\test”)
path not supported error coming
path for eg is like this(“\htrewg\sample\test”)
Try double slash \ htrewg\sample\test\
Assign:
destinationFolderPath = “\\htrewg\sample\test”
Copy File:
Source = sourceFilePath
Destination = destinationFolderPath + “\” + destinationFileName
path not supported error coming again
with double slash also path not supported error coming
from local folder(“c:\test.xlsx”) to network shared path (“\htrewg\sample\test.xlsx”)
Is this possible with copy file or move file activities?
currentDate = DateTime.Now.ToString(“dd-MM-yy_HH:mm tt”)
destinationPath = “\htrewg\sample\test\test_” + currentDate + “.xlsx”
Copyfile(“C:\path\to\your\file.xlsx”, destinationPath)
Hope it helps!!
it is working but I need file name like this test_19-07-2023_15:50:02.xlsx
Try this
destinationPath = "\htrewg\sample\test"+“test_”+ currentDate + “.xlsx”
tried path not supported error
Assign
Datetime variable
Date_Var=Now
“test_”+ Date_Var.ToString+“.xlsx”
path not supported for this also