directory

icacls permissions script in powershell

这一生的挚爱 提交于 2019-12-13 05:06:26
问题 Let me start off by saying I am very new to scripting! Basically what I am trying to do is to write a script that will create all of these files: For the 13-14 in the files that is the previous and current year so I need a variable that when I run the script next year it will be 14-15. The top folders are AD,CC,DC,FS,IT,OP: For example C:\Test\AD\13-14\Audit\Fir C:\Test\CC\13-14\OSA C:\Test\DC\13-14\Vendor C:\Test\FS\13-14\Maintenance C:\Test\IT\13-14\Detail C:\Test\OP\13-14\Training (There

link to home directory in asp.net

帅比萌擦擦* 提交于 2019-12-13 05:04:40
问题 For the website I am developing, there is to be a link to Home directory in the master file's footer. Thus, I used <a href="/">Home</a> but it doesn't work. In fact it needs the name of my site, say <a href="/MySite"></a> to load the Default.aspx of the home directory. I am looking for a way to specify the URL independent from whatever the name of my site is (here Mysite), because I fear using site name might raise issues in future if I decide to rename the home folder. 回答1: You can try that:

How to compare two directories and their files in perl

僤鯓⒐⒋嵵緔 提交于 2019-12-13 04:58:54
问题 Fred here again with a little issue I'm having that I hope you guys can help me with. I'm reviewing for midterms and going over an old file I found on here and I wanted to get it working. I can't find it on here anymore but I still have the source code so I'll make another question on it. So here was his assignment: Write a perl script that will compare two directories for differences in regular files. All regular files with the same names should be tested with the unix function /usr/bin/diff

Qt tree view with Pyside

冷暖自知 提交于 2019-12-13 04:42:34
问题 I have two folders in program directory. I need them to show in tree view, they should be expandable. How can I define what folder will be in tree view? If anyone canshow me an easy example. I know names of folders. I´m using Python 2.7 and Win 8. 回答1: You can do that with QTreeView and QFileSystemModel : model = QFileSystemModel(); model.setRootPath(QDir.currentPath()) tree = QTreeView() tree.setModel(model) tree.setRootIndex(model.index(QDir.currentPath())) tree.show() 来源: https:/

Batch file to recursively move files to first level directory from deeper subdirectories

六月ゝ 毕业季﹏ 提交于 2019-12-13 04:37:40
问题 I have a hard drive with files and folders ordered in this similar manner: F:\folder1\folder\folder\file.rar F:\folder1\folder\folder\file1.rar F:\folder1\folder\folder\file2.rar F:\folder2\folder\file.rar F:\folder2\folder\file1.rar F:\folder3\folder\file.rar F:\folder3\folder\folder\folder\file.rar I'd like to move all files in this drive to F:\\*\ , Rename if a duplicate filename is found, and recursively delete empty folders afterwards. There's just too many of these folders to find out

Cloudbees Jenkins Folders Plugin: Folder Name as Enviroment Variable

巧了我就是萌 提交于 2019-12-13 04:30:29
问题 Is the Folder Name available as an environment variable similar to JOB_NAME? For a folder; JOB_NAME contains the full path including parent folders. I want the immediate parent folder as an environment variable. 回答1: No such variable exists, but $(basename $(dirname $JOB_NAME)) would give you what you are asking for. 回答2: Using the suggestion of $(basename $(dirname $JOB_NAME)) combined with the Environment Script Plugin, you should be able to set such an environment variable by selecting

File does exists when calling .exists() but can't find it later

不羁的心 提交于 2019-12-13 04:22:29
问题 I'm trying to create a file that is eventually going to hold a picture (EXTRA_OUTPUT) like this: File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), "scouthouse"); if(!mediaStorageDir.exists()) { mediaStorageDir.mkdirs(); } SimpleDateFormat s = new SimpleDateFormat("ddMMyyyyhhmmss"); String format = s.format(new Date()); File file = new File(mediaStorageDir.getPath() + File.separator + format + ".jpg"); try { file.createNewFile(); }

Pasting file name at the end of each row

点点圈 提交于 2019-12-13 04:07:57
问题 I am trying to copy values from few excel files into one. I am trying to achieve that by first looping through directories and then files. For Each cell In ThisWorkbook.Sheets("Info").Range("b8:b9") MsgBox (cell) strfile = Dir$(cell & "\" & "*.xlsm", vbNormal) While strfile <> "" MsgBox (strfile) ' Open the file and get the source sheet Set wbSource = Workbooks.Open(cell & "\" & strfile) Set inSource = wbSource.Sheets("OUTPUT_INSTRUMENT") Set enSource = wbSource.Sheets("OUTPUT_ENTITY") Set

PHP - Read number of dirs and then require for each a specified file name

笑着哭i 提交于 2019-12-13 03:53:48
问题 I want to make a little script but I'm rather n00b in php so please help me if you can :) What I want the script to do is: I have "index.php". I want "index.php" to read the sub-directories from a known folder, let's say "templates/" Each sub-directory will contain a file called "content.html". The index will then load the "content.html" with the require() function for each of the existing sub-directories. Thank you very much for your help! 回答1: The RecursiveDirectoryIterator runs through the

c++ folder only search

戏子无情 提交于 2019-12-13 03:51:14
问题 I need to get a list of folders in the directory, but only the folders. No files are needed. Only folders. I use filters to determine if this is a folder, but they do not work and all files and folders are output. string root = "D:\\*"; cout << "Scan " << root << endl; std::wstring widestr = std::wstring(root.begin(), root.end()); const wchar_t* widecstr = widestr.c_str(); WIN32_FIND_DATAW wfd; HANDLE const hFind = FindFirstFileW(widecstr, &wfd); In this way, I check that it is a folder. if