0

I'm trying to get access to a text file in my network drive using a batch file so I can write to the file in question. However I can't seem to do this. The network drive is: "T:\Development\Projects\ReportingTool\Text.txt"

How can I do this?

Andrew Kilburn
  • 2,251
  • 6
  • 33
  • 65
  • 1
    Huh? Try `TYPE "T:\Development\Projects\ReportingTool\Text.txt"` to see if you can read it. – Mark Setchell Feb 11 '16 at 17:17
  • You have not provided any code to show us what you tried to do. Please provide the code you are using otherwise everyone is just grasping at straws. – Squashman Feb 11 '16 at 18:55
  • Network drives are configured per user account and are established only on user login and disconnected automatically on user logout. Batch files executed as scheduled task with using account as defined in the scheduled task must either use UNC path when the used user account has the credentials to access the directories/files on the other computer at all or connect and disconnect the network drive inside the batch file. See for example answer on [Read variable from external file not working on running as scheduled task](http://stackoverflow.com/a/34557746/3074564). – Mofi Feb 12 '16 at 06:44
  • @MarkSetchell Thanks, this worked. Previously I've been trying to map a network drive and do it through the cmd. But this works better as I preferred not to do that. I don't know why it's been so difficult to find an answer. Thanks! – Andrew Kilburn Feb 15 '16 at 09:39

0 Answers0