Upload file
Hi
Are there a way to upload 1 or more file(s) with a wildcard via scripts?
Or do I have to zip a folder and upload that ?
I was looking after uploading BSOD dumps (C:\Windows\minidump\*.dmp) but if I do that then it will just create a file called "*.dmp" in the machine info :/
And how do I delete the files ?
I could just make a script that copy them to a network share, but this could be nice in other scenario's aswell.
- René
Are there a way to upload 1 or more file(s) with a wildcard via scripts?
Or do I have to zip a folder and upload that ?
I was looking after uploading BSOD dumps (C:\Windows\minidump\*.dmp) but if I do that then it will just create a file called "*.dmp" in the machine info :/
And how do I delete the files ?
I could just make a script that copy them to a network share, but this could be nice in other scenario's aswell.
- René
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
GillySpy
13 years ago
You would have to do this in batch. There is no canned mechanism for upload of a directory or the new file in a directory, etc.
You cannot delete the file directly. You can upload a file of the same name overtop ( 0 byte to clear it) or delete the machine from inventory. A zip file would help to manage this.
You cannot delete the file directly. You can upload a file of the same name overtop ( 0 byte to clear it) or delete the machine from inventory. A zip file would help to manage this.
Posted by:
cblake
13 years ago
René - Would a command line zip utility as part of a script help serve your needs? 7zip, winzip, and many others have command line options. You could write a script that zipped them, then use your other favorite method for collecting them (Customer ticket rules and custom inventory rules possibly). I think storing them on K1000 is not the best route though.
Posted by:
rmeyer
13 years ago
Posted by:
rmeyer
13 years ago
Another question related to the minidump folder ;)
I would like it to return the amount of files in the minidump folder if it exist, so I would know what PC's might have an issue that I should look into
So I created a Custom Inventory item:
DirectoryExists(C:\Windows\Minidump)
AND
ShellCommandTextReturn(dir C:\Windows\Minidump\*.*|Find "File(s)")
BUT if I use the > |Find "File(s)" < it will not return any information.
If I change it to: ShellCommandTextReturn(dir "C:\Windows\Minidump\*.*")
then it returns the normal "dir" information but I would like to keep the custom inventory to a one liner in the inventory.
I would like to avoid creating scripts that need to run every now and then to return this information when there is a easier way :)
I would like it to return the amount of files in the minidump folder if it exist, so I would know what PC's might have an issue that I should look into
So I created a Custom Inventory item:
DirectoryExists(C:\Windows\Minidump)
AND
ShellCommandTextReturn(dir C:\Windows\Minidump\*.*|Find "File(s)")
BUT if I use the > |Find "File(s)" < it will not return any information.
If I change it to: ShellCommandTextReturn(dir "C:\Windows\Minidump\*.*")
then it returns the normal "dir" information but I would like to keep the custom inventory to a one liner in the inventory.
I would like to avoid creating scripts that need to run every now and then to return this information when there is a easier way :)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.